{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Hello PixieDust!\n",
    "This sample notebook provides you with an introduction to many features included in PixieDust. You can find more information about PixieDust at https://pixiedust.github.io/pixiedust/. To ensure you are running the latest version of PixieDust uncomment and run the following cell. Do not run this cell if you installed PixieDust locally from source and want to continue to run PixieDust from source."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting pixiedust\n",
      "  Downloading pixiedust-1.0.5.tar.gz (110kB)\n",
      "\u001b[K    100% |████████████████████████████████| 112kB 824kB/s ta 0:00:01\n",
      "\u001b[?25hRequirement already up-to-date: mpld3 in /Users/mbrobergus.ibm.com/anaconda/lib/python2.7/site-packages (from pixiedust)\n",
      "Requirement already up-to-date: lxml in /Users/mbrobergus.ibm.com/.local/lib/python2.7/site-packages (from pixiedust)\n",
      "Building wheels for collected packages: pixiedust\n",
      "  Running setup.py bdist_wheel for pixiedust ... \u001b[?25l-\b \b\\\b \bdone\n",
      "\u001b[?25h  Stored in directory: /Users/mbrobergus.ibm.com/Library/Caches/pip/wheels/64/88/d8/dab16cc6385c872294f763afd88cb35bc3a6e679506b1e5231\n",
      "Successfully built pixiedust\n",
      "Installing collected packages: pixiedust\n",
      "Successfully installed pixiedust-1.0.5\n"
     ]
    }
   ],
   "source": [
    "!pip install --user --upgrade pixiedust"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Import PixieDust\n",
    "Run the following cell to import the PixieDust library. You may need to restart your kernel after importing. Follow the instructions, if any, after running the cell. Note: You must import PixieDust every time you restart your kernel."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pixiedust database opened successfully\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "        <div style=\"margin:10px\">\n",
       "            <a href=\"https://github.com/ibm-watson-data-lab/pixiedust\" target=\"_new\">\n",
       "                <img src=\"https://github.com/ibm-watson-data-lab/pixiedust/raw/master/docs/_static/pd_icon32.png\" style=\"float:left;margin-right:10px\"/>\n",
       "            </a>\n",
       "            <span>Pixiedust version upgraded from 1.0.4 to 1.0.5</span>\n",
       "        </div>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import pixiedust"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Enable the Spark Progress Monitor\n",
    "PixieDust includes a Spark Progress Monitor bar that lets you track the status of your Spark jobs. You can find more info at https://pixiedust.github.io/pixiedust/sparkmonitor.html. Note: there is a known issue with the Spark Progress Monitor on Spark 2.1. Run the following cell to enable the Spark Progress Monitor:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Succesfully enabled Spark Job Progress Monitor\n"
     ]
    }
   ],
   "source": [
    "pixiedust.enableJobMonitor();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example use of the PackageManager\n",
    "You can use the PackageManager component of Pixiedust to install and uninstall maven packages into your notebook kernel without editing configuration files. This component is essential when you run notebooks from a hosted cloud environment and do not have access to the configuration files. You can find more info at https://pixiedust.github.io/pixiedust/packagemanager.html. Run the following cell to install the GraphFrame package. You may need to restart your kernel after installing new packages. Follow the instructions, if any, after running the cell. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Package already installed: graphframes:graphframes:0.1.0-spark1.6\n",
      "done\n"
     ]
    }
   ],
   "source": [
    "pixiedust.installPackage(\"graphframes:graphframes:0.1.0-spark1.6\")\n",
    "print(\"done\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Run the following cell to print out all installed packages:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerefbaaae6\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistieefbaaae6\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNameefbaaae6\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressefbaaae6\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerefbaaae6\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsefbaaae6\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentefbaaae6\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistieefbaaae6\").click(function(){\n",
       "    visible = $(\"#pm_containerefbaaae6\").is(':visible');\n",
       "    $(\"#pm_containerefbaaae6\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "graphframes:graphframes:0.1.0-spark1.6 => /Users/mbrobergus.ibm.com/pixiedust/data/libs/graphframes-0.1.0-spark1.6.jar\n"
     ]
    }
   ],
   "source": [
    "pixiedust.printAllPackages()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example use of the display() API\n",
    "PixieDust lets you visualize your data in just a few clicks using the display() API. You can find more info at https://pixiedust.github.io/pixiedust/displayapi.html. The following cell creates a DataFrame and uses the display() API to create a bar chart:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "pixiedust": {
     "displayParams": {
      "aggregation": "SUM",
      "charttype": "grouped",
      "clusterby": "year",
      "handlerId": "barChart",
      "keyFields": "zone",
      "rendererId": "bokeh",
      "rowCount": "100",
      "showLegend": "true",
      "stacked": "false",
      "staticFigure": "false",
      "title": "Simple Bar Chart",
      "valueFields": "unique_customers"
     }
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"pixiedust\" pixiedust=\"{&quot;prefix&quot;: &quot;505326c4&quot;, &quot;command&quot;: &quot;display(d1,cell_id=&apos;E5567636FCD6456F8FCA891793706C98&apos;,nostore_pixiedust=&apos;true&apos;,showLegend=&apos;true&apos;,stacked=&apos;false&apos;,title=&apos;Simple Bar Chart&apos;,staticFigure=&apos;false&apos;,aggregation=&apos;SUM&apos;,clusterby=&apos;year&apos;,rowCount=&apos;100&apos;,handlerId=&apos;barChart&apos;,valueFields=&apos;unique_customers&apos;,rendererId=&apos;bokeh&apos;,charttype=&apos;grouped&apos;,keyFields=&apos;zone&apos;,nostore_cw=&apos;1098&apos;,org_params=&apos;nostore_pixiedust&apos;,nostore_bokeh=&apos;false&apos;)&quot;, &quot;options&quot;: {&quot;nostore_bokeh&quot;: &quot;false&quot;, &quot;showLegend&quot;: &quot;true&quot;, &quot;cell_id&quot;: &quot;E5567636FCD6456F8FCA891793706C98&quot;, &quot;stacked&quot;: &quot;false&quot;, &quot;title&quot;: &quot;Simple Bar Chart&quot;, &quot;org_params&quot;: &quot;nostore_pixiedust&quot;, &quot;staticFigure&quot;: &quot;false&quot;, &quot;aggregation&quot;: &quot;SUM&quot;, &quot;nostore_cw&quot;: &quot;1098&quot;, &quot;clusterby&quot;: &quot;year&quot;, &quot;rowCount&quot;: &quot;100&quot;, &quot;handlerId&quot;: &quot;barChart&quot;, &quot;valueFields&quot;: &quot;unique_customers&quot;, &quot;rendererId&quot;: &quot;bokeh&quot;, &quot;charttype&quot;: &quot;grouped&quot;, &quot;keyFields&quot;: &quot;zone&quot;, &quot;nostore_pixiedust&quot;: &quot;true&quot;, &quot;showchrome&quot;: &quot;true&quot;}}\">\n",
       "  <button class=\"btn btn-default btn-sm expandButton\" data-toggle=\"collapse\"\n",
       "          data-target=\"#pixiedust-output-wrapper-505326c4\" title=\"Expand/Collapse Pixiedust output\">\n",
       "    <i class=\"fa\"></i>\n",
       "  </button>\n",
       "  <div id=\"pixiedust-output-wrapper-505326c4\" class=\"pixiedust-output-wrapper collapse in\">\n",
       "    \n",
       "      <div class=\"pixiedust-toolbar btn-group\" role=\"group\" style=\"margin-bottom:15px\">  \n",
       "      \n",
       "        \n",
       "          <a class=\"btn btn-small btn-default display-type-button\" id=\"menu505326c4-dataframe\" title=\"DataFrame Table\">\n",
       "            <i class=\"fa fa-table\"></i>\n",
       "          </a>\n",
       "          \n",
       "            <script>\n",
       "                $('#menu505326c4-dataframe').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='dataframe',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "        \n",
       "      \n",
       "        \n",
       "          <div class=\"btn-group btn-small display-type-button\">\n",
       "            \n",
       "            <a class=\"btn btn-small dropdown-toggle btn-default\" data-toggle=\"dropdown\" title=\"Chart\">\n",
       "              \n",
       "              <i class=\"fa fa-line-chart\"></i>\n",
       "              \n",
       "              <i class=\"fa fa-chevron-down\"></i>\n",
       "            </a>\n",
       "            <div class=\"dropdown-menu\" role=\"menu\" style=\"white-space:nowrap\">\n",
       "              <ul>\n",
       "              \n",
       "                <li id=\"menu505326c4-barChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-bar-chart\"></i>\n",
       "                  \n",
       "                  <span>Bar Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-barChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-lineChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-line-chart\"></i>\n",
       "                  \n",
       "                  <span>Line Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-lineChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='lineChart',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-scatterPlot\">\n",
       "                  \n",
       "                  <i class=\"fa fa-circle\"></i>\n",
       "                  \n",
       "                  <span>Scatter Plot</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-scatterPlot').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='scatterPlot',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-pieChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-pie-chart\"></i>\n",
       "                  \n",
       "                  <span>Pie Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-pieChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='pieChart',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-mapView\">\n",
       "                  \n",
       "                  <i class=\"fa fa-globe\"></i>\n",
       "                  \n",
       "                  <span>Map</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-mapView').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='mapView',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-histogram\">\n",
       "                  \n",
       "                  <i class=\"fa fa-table\"></i>\n",
       "                  \n",
       "                  <span>Histogram</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-histogram').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='histogram',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "              </ul>\n",
       "            </div>\n",
       "          </div>\n",
       "        \n",
       "      \n",
       "        \n",
       "      \n",
       "        \n",
       "      \n",
       "        \n",
       "          <div class=\"btn-group btn-small display-type-button\">\n",
       "            \n",
       "            <a class=\"btn btn-small dropdown-toggle btn-default\" data-toggle=\"dropdown\" title=\"Stash dataset\">\n",
       "              \n",
       "              <i class=\"fa fa-cloud-download\"></i>\n",
       "              \n",
       "              <i class=\"fa fa-chevron-down\"></i>\n",
       "            </a>\n",
       "            <div class=\"dropdown-menu\" role=\"menu\" style=\"white-space:nowrap\">\n",
       "              <ul>\n",
       "              \n",
       "                <li id=\"menu505326c4-downloadFile\">\n",
       "                  \n",
       "                  <i class=\"fa fa-download\"></i>\n",
       "                  \n",
       "                  <span>Download as File</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-downloadFile').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='downloadFile',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu505326c4-stashCloudant\">\n",
       "                  \n",
       "                  <i class=\"fa fa-cloud\"></i>\n",
       "                  \n",
       "                  <span>Stash to Cloudant</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu505326c4-stashCloudant').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='stashCloudant',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "              </ul>\n",
       "            </div>\n",
       "          </div>\n",
       "        \n",
       "      \n",
       "      </div>\n",
       "    \n",
       "    <div id=\"wrapperJS505326c4\"></div>\n",
       "    <div id=\"wrapperHTML505326c4\" class=\"pixiedustWrapperHTML\" style=\"min-height:100px\"></div>\n",
       "  </div>\n",
       "</div>\n",
       "                    <script>\n",
       "                    (\n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML505326c4');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML505326c4');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"E5567636FCD6456F8FCA891793706C98\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution505326c4\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution505326c4\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution505326c4\").length > 0 ){\n",
       "                    $(\"#execution505326c4\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone505326c4 != \"undefined\"){\n",
       "                    onDisplayDone505326c4();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d1,cell_id='E5567636FCD6456F8FCA891793706C98',nostore_pixiedust='true',showLegend='true',stacked='false',title='Simple Bar Chart',staticFigure='false',aggregation='SUM',clusterby='year',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='bokeh',charttype='grouped',keyFields='zone',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='false',prefix='505326c4')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS505326c4').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")();\n",
       "                    </script>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">.pd_warning{display:none;}</style><div class=\"pd_warning\"><em>Hey, there's something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>\n",
       "        <div class=\"pd_save is-viewer-good\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            Simple Bar Chart\n",
       "        </div>\n",
       "    <div id=\"chartFigure505326c4\" class=\"pd_save is-viewer-good\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    \n",
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <div class=\"bk-grid-column bk-layout-fixed\" id=\"modelid_96e9aa5e-2a82-44dc-b9c6-d2bd832ec549\" style=\"width: 803px; height: 631px;\"><div class=\"bk-toolbar-box bk-layout-scale_width\" id=\"modelid_2aead599-21d1-44ce-bb2d-5019534981c6\" style=\"width: 803px; height: 30px;\"><div class=\"bk-toolbar-wrapper bk-layout-scale_width\" id=\"modelid_ToolbarBoxToolbar-236BE1233B024FC489195B398D274917\" style=\"left: 0px; top: 0px; width: 803px; height: 30px;\"><div class=\"bk-toolbar-above bk-toolbar-not-sticky\"><a href=\"http://bokeh.pydata.org/\" target=\"_blank\" class=\"bk-logo bk-logo-small\"></a><div class=\"bk-button-bar\"><div class=\"bk-button-bar-list\" type=\"pan\"><div class=\"bk-toolbar-button bk-active\"><div class=\"bk-btn-icon bk-tool-icon-pan\"></div><span class=\"bk-tip\">Pan</span></div><div class=\"bk-toolbar-button\"><div class=\"bk-btn-icon bk-tool-icon-box-zoom\"></div><span class=\"bk-tip\">Box Zoom</span></div></div><div class=\"bk-button-bar-list\" type=\"scroll\"><div class=\"bk-toolbar-button\"><div class=\"bk-btn-icon bk-tool-icon-wheel-zoom\"></div><span class=\"bk-tip\">Wheel Zoom</span></div></div><div class=\"bk-button-bar-list\" type=\"pinch\"></div><div class=\"bk-button-bar-list\" type=\"tap\"></div><div class=\"bk-button-bar-list\" type=\"press\"></div><div class=\"bk-button-bar-list\" type=\"rotate\"></div><div class=\"bk-button-bar-list\" type=\"actions\"><div class=\"bk-toolbar-button\"><div class=\"bk-btn-icon bk-tool-icon-save\"></div><span class=\"bk-tip\">Save</span></div><div class=\"bk-toolbar-button\"><div class=\"bk-btn-icon bk-tool-icon-reset\"></div><span class=\"bk-tip\">Reset</span></div></div><div class=\"bk-button-bar-list\" type=\"inspectors\"></div><div class=\"bk-button-bar-list\" type=\"help\"><div class=\"bk-toolbar-button\"><div class=\"bk-btn-icon bk-tool-icon-help\"></div><span class=\"bk-tip\">Click the question mark to learn more about Bokeh plot tools.</span></div></div></div></div></div></div><div class=\"bk-grid-column bk-layout-fixed\" id=\"modelid_8cf0f517-a32a-43a1-9d82-1aee2fa47ab2\" style=\"width: 803px; height: 601px;\"><div class=\"bk-grid-row bk-layout-fixed\" id=\"modelid_f26666cf-d39c-48ec-9fc9-3e35d10db888\" style=\"width: 803px; height: 601px;\"><div class=\"bk-plot-layout bk-layout-fixed\" id=\"modelid_49575c96-2fdd-4cf9-80cc-edb40a445905\" style=\"width: 803px; height: 601px;\"><div class=\"bk-plot-wrapper\" style=\"position: absolute; left: 0px; top: 0px; width: 803px; height: 601px;\"><div class=\"bk-canvas-wrapper\" style=\"touch-action: none; -moz-user-select: none; width: 803px; height: 601px;\"><div class=\"bk-canvas-events\"></div><div class=\"bk-canvas-overlays\"><div class=\"bk-shading\" style=\"display: none;\"></div></div><canvas class=\"bk-canvas\" style=\"width: 803px; height: 601px;\" width=\"803\" height=\"601\"></canvas></div></div></div></div></div></div>\n",
       "    </div>\n",
       "<script type=\"text/javascript\">\n",
       "  \n",
       "  (function(global) {\n",
       "    function now() {\n",
       "      return new Date();\n",
       "    }\n",
       "  \n",
       "    var force = false;\n",
       "  \n",
       "    if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "      window._bokeh_onload_callbacks = [];\n",
       "      window._bokeh_is_loading = undefined;\n",
       "    }\n",
       "  \n",
       "  \n",
       "    \n",
       "    if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "      window._bokeh_timeout = Date.now() + 0;\n",
       "      window._bokeh_failed_load = false;\n",
       "    }\n",
       "  \n",
       "    var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "       \"<div style='background-color: #fdd'>\\n\"+\n",
       "       \"<p>\\n\"+\n",
       "       \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "       \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "       \"</p>\\n\"+\n",
       "       \"<ul>\\n\"+\n",
       "       \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "       \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "       \"</ul>\\n\"+\n",
       "       \"<code>\\n\"+\n",
       "       \"from bokeh.resources import INLINE\\n\"+\n",
       "       \"output_notebook(resources=INLINE)\\n\"+\n",
       "       \"</code>\\n\"+\n",
       "       \"</div>\"}};\n",
       "  \n",
       "    function display_loaded() {\n",
       "      if (window.Bokeh !== undefined) {\n",
       "        document.getElementById(\"790c2f4a-ecac-4f5b-ab4f-15cd9d28c433\").textContent = \"BokehJS successfully loaded.\";\n",
       "      } else if (Date.now() < window._bokeh_timeout) {\n",
       "        setTimeout(display_loaded, 100)\n",
       "      }\n",
       "    }\n",
       "  \n",
       "    function run_callbacks() {\n",
       "      window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "      delete window._bokeh_onload_callbacks\n",
       "      console.info(\"Bokeh: all callbacks have finished\");\n",
       "    }\n",
       "  \n",
       "    function load_libs(js_urls, callback) {\n",
       "      window._bokeh_onload_callbacks.push(callback);\n",
       "      if (window._bokeh_is_loading > 0) {\n",
       "        console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "        return null;\n",
       "      }\n",
       "      if (js_urls == null || js_urls.length === 0) {\n",
       "        run_callbacks();\n",
       "        return null;\n",
       "      }\n",
       "      console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "      window._bokeh_is_loading = js_urls.length;\n",
       "      for (var i = 0; i < js_urls.length; i++) {\n",
       "        var url = js_urls[i];\n",
       "        var s = document.createElement('script');\n",
       "        s.src = url;\n",
       "        s.async = false;\n",
       "        s.onreadystatechange = s.onload = function() {\n",
       "          window._bokeh_is_loading--;\n",
       "          if (window._bokeh_is_loading === 0) {\n",
       "            console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "            run_callbacks()\n",
       "          }\n",
       "        };\n",
       "        s.onerror = function() {\n",
       "          console.warn(\"failed to load library \" + url);\n",
       "        };\n",
       "        console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      }\n",
       "    };var element = document.getElementById(\"790c2f4a-ecac-4f5b-ab4f-15cd9d28c433\");\n",
       "    if (element == null) {\n",
       "      console.log(\"Bokeh: ERROR: autoload.js configured with elementid '790c2f4a-ecac-4f5b-ab4f-15cd9d28c433' but no matching script tag was found. \")\n",
       "      return false;\n",
       "    }\n",
       "  \n",
       "    var js_urls = [];\n",
       "  \n",
       "    var inline_js = [\n",
       "      function(Bokeh) {\n",
       "        (function() {\n",
       "          var fn = function() {\n",
       "            var docs_json = {\"cd3a417b-b533-496f-9760-4a1f0ebbbe23\":{\"roots\":{\"references\":[{\"attributes\":{\"axis_label\":\"Zone\",\"formatter\":{\"id\":\"15ff5a81-ff0a-4327-a111-7f03e199c95d\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"291f2f5b-12bd-45f3-b0da-59fcb9826865\",\"type\":\"CategoricalTicker\"}},\"id\":\"44a01f86-698e-41f7-9e28-560e61afafef\",\"type\":\"CategoricalAxis\"},{\"attributes\":{\"children\":[{\"id\":\"f26666cf-d39c-48ec-9fc9-3e35d10db888\",\"type\":\"Row\"}]},\"id\":\"8cf0f517-a32a-43a1-9d82-1aee2fa47ab2\",\"type\":\"Column\"},{\"attributes\":{\"label\":{\"value\":\"2013\"},\"renderers\":[{\"id\":\"ca8db4a8-4d3c-4a27-a59d-75f636f01512\",\"type\":\"GlyphRenderer\"}]},\"id\":\"9f66a979-36e4-4f4a-83dc-3da0a08d3506\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"29e0455d-3cf2-486a-a001-b636b70aed03\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d9f31009-2bcf-44ad-96ef-7db99161545f\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"c0c03a8c-1e75-4660-99f5-a19b5b38597c\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6d4be7cf-814f-4fd2-bb9b-764a48f7bd7d\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2010,\"zone\":\"Outdoor Protection\"}],\"color\":[\"#f22c40\"],\"fill_alpha\":[0.8],\"height\":[2.0],\"label\":[{\"year\":2010,\"zone\":\"Outdoor Protection\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Outdoor Protection:0.2\"],\"y\":[1.0],\"year\":[2010],\"zone\":[\"Outdoor Protection\"]}},\"id\":\"6c940398-59eb-4e94-ace2-0fbe4392d355\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"label\":{\"value\":\"2011\"},\"renderers\":[{\"id\":\"49b53b75-9741-4201-bb4e-ebc882f1d699\",\"type\":\"GlyphRenderer\"}]},\"id\":\"87adf272-2a5f-4888-8a5f-a863967f04e6\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2013,\"zone\":\"Golf Equipment\"}],\"color\":[\"#df5320\"],\"fill_alpha\":[0.8],\"height\":[5.0],\"label\":[{\"year\":2013,\"zone\":\"Golf Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Golf Equipment:0.8\"],\"y\":[2.5],\"year\":[2013],\"zone\":[\"Golf Equipment\"]}},\"id\":\"fab0026b-ebee-4c9a-94a8-fd3da38b6ecc\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2011,\"zone\":\"Personal Accessories\"}],\"color\":[\"#5ab738\"],\"fill_alpha\":[0.8],\"height\":[2.0],\"label\":[{\"year\":2011,\"zone\":\"Personal Accessories\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Personal Accessories:0.4\"],\"y\":[1.0],\"year\":[2011],\"zone\":[\"Personal Accessories\"]}},\"id\":\"9b821c1e-c15d-4d2c-b671-ae5fc62644e6\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"below\":[{\"id\":\"44a01f86-698e-41f7-9e28-560e61afafef\",\"type\":\"CategoricalAxis\"}],\"css_classes\":null,\"left\":[{\"id\":\"b1c8b974-9374-4dd3-b230-0c0dcc9ac8d5\",\"type\":\"LinearAxis\"}],\"plot_height\":601,\"plot_width\":803,\"renderers\":[{\"id\":\"7c944c22-4e73-4e45-862d-ce9bb2b37162\",\"type\":\"BoxAnnotation\"},{\"id\":\"36319ebd-f096-455a-8ff6-233a6f1f6d97\",\"type\":\"GlyphRenderer\"},{\"id\":\"49b53b75-9741-4201-bb4e-ebc882f1d699\",\"type\":\"GlyphRenderer\"},{\"id\":\"e9e58ce1-5265-456b-b903-f636acb30867\",\"type\":\"GlyphRenderer\"},{\"id\":\"ca8db4a8-4d3c-4a27-a59d-75f636f01512\",\"type\":\"GlyphRenderer\"},{\"id\":\"6ecbb55c-cee4-4147-b17d-14cac8b1b413\",\"type\":\"GlyphRenderer\"},{\"id\":\"a03fbafc-2450-4408-a621-20aa45f0c052\",\"type\":\"GlyphRenderer\"},{\"id\":\"d1422c25-fb9c-40f1-8197-0a831f57275f\",\"type\":\"GlyphRenderer\"},{\"id\":\"5e8242aa-3698-4e17-ae68-4a2054f72a30\",\"type\":\"GlyphRenderer\"},{\"id\":\"52675195-26a5-4cc2-8111-99e938cabb05\",\"type\":\"GlyphRenderer\"},{\"id\":\"3ab107d6-b6cb-41fa-aa3e-9c2cb35d5fa9\",\"type\":\"GlyphRenderer\"},{\"id\":\"0d64d5d2-0197-43b3-acf0-769ca8567be1\",\"type\":\"GlyphRenderer\"},{\"id\":\"e648dc76-019e-4c26-a97c-304e73e43e27\",\"type\":\"GlyphRenderer\"},{\"id\":\"c92dda80-fb8e-49c8-8856-5f0f3f6daedc\",\"type\":\"GlyphRenderer\"},{\"id\":\"a4ebe8ed-e799-4db6-a85e-44535a7ae456\",\"type\":\"GlyphRenderer\"},{\"id\":\"cc408bb0-1fde-44ce-ae25-e1519f0923ac\",\"type\":\"GlyphRenderer\"},{\"id\":\"7ee1c862-48ba-4e11-bb98-239e285b7113\",\"type\":\"GlyphRenderer\"},{\"id\":\"5859cfaa-8d43-46de-8d69-779c7fb82a8b\",\"type\":\"GlyphRenderer\"},{\"id\":\"ce2b27af-80f9-435d-ab0e-02a2c5e1af9d\",\"type\":\"GlyphRenderer\"},{\"id\":\"57548a18-56a8-4aa4-8c1d-89b45c9c125b\",\"type\":\"GlyphRenderer\"},{\"id\":\"f6fe81d0-b46d-44e0-85fa-2d66a6c24b83\",\"type\":\"GlyphRenderer\"},{\"id\":\"daeb5aef-d901-4cf8-ab9f-da2a1726d1c3\",\"type\":\"Legend\"},{\"id\":\"44a01f86-698e-41f7-9e28-560e61afafef\",\"type\":\"CategoricalAxis\"},{\"id\":\"b1c8b974-9374-4dd3-b230-0c0dcc9ac8d5\",\"type\":\"LinearAxis\"},{\"id\":\"1b6c9451-be5c-42e8-81ac-21a05356a1b3\",\"type\":\"Grid\"}],\"title\":{\"id\":\"5d9c3977-3f2d-40cf-8b2d-1a8e69db310e\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"839a4f5d-69f7-4feb-bfe9-6131732ec1a9\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"94be6425-665e-4c3b-a6a7-bb662b07123d\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_mapper_type\":\"auto\",\"x_range\":{\"id\":\"fb319632-a4db-4df4-be7a-fa3f1d2fce1a\",\"type\":\"FactorRange\"},\"y_mapper_type\":\"auto\",\"y_range\":{\"id\":\"fa4c1f4f-2d2d-4d63-83db-520367f5357a\",\"type\":\"Range1d\"}},\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"},{\"attributes\":{\"data_source\":{\"id\":\"9b821c1e-c15d-4d2c-b671-ae5fc62644e6\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"c0c03a8c-1e75-4660-99f5-a19b5b38597c\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"ce2b27af-80f9-435d-ab0e-02a2c5e1af9d\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5bf2f5d9-cc1a-49ca-9bec-cb50aae5c4ed\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2013,\"zone\":\"Personal Accessories\"}],\"color\":[\"#df5320\"],\"fill_alpha\":[0.8],\"height\":[4.0],\"label\":[{\"year\":2013,\"zone\":\"Personal Accessories\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Personal Accessories:0.8\"],\"y\":[2.0],\"year\":[2013],\"zone\":[\"Personal Accessories\"]}},\"id\":\"5fdb34cd-6584-43c9-8a96-182cde43202c\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2011,\"zone\":\"Outdoor Protection\"}],\"color\":[\"#5ab738\"],\"fill_alpha\":[0.8],\"height\":[4.0],\"label\":[{\"year\":2011,\"zone\":\"Outdoor Protection\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Outdoor Protection:0.4\"],\"y\":[2.0],\"year\":[2011],\"zone\":[\"Outdoor Protection\"]}},\"id\":\"de96fe9c-de3d-4cd7-a373-034a706f5263\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"a6279d61-e31d-44ad-93de-259e55eefa35\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"0495155d-6ee2-434e-be19-ef821c025f07\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"57548a18-56a8-4aa4-8c1d-89b45c9c125b\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6b41112d-1c20-4464-addb-09e8de2117e1\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"b564beec-0935-481f-b21f-b1d9db69e95f\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"2f42655f-3147-4580-b1a4-071a49715d2e\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"ca8db4a8-4d3c-4a27-a59d-75f636f01512\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"616df7b8-3a88-4de3-9900-d68d07ba2dfa\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data_source\":{\"id\":\"372e324b-2d36-466a-88ba-8a48c37232a5\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6731b7ac-01f9-491d-85c5-0b750440f4c3\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"0d64d5d2-0197-43b3-acf0-769ca8567be1\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"factors\":[\"Camping Equipment\",\"Golf Equipment\",\"Mountaineering Equipment\",\"Outdoor Protection\",\"Personal Accessories\"]},\"id\":\"fb319632-a4db-4df4-be7a-fa3f1d2fce1a\",\"type\":\"FactorRange\"},{\"attributes\":{\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"c0a76d85-0820-4765-a5fe-f6f3100863e2\",\"type\":\"PanTool\"},{\"attributes\":{\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"32181aa3-a96b-4758-ac8c-656b19e8d189\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"98e3ab3f-ed4f-4488-b485-b6e4d7499add\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6499e3d0-bd65-40b3-8cf3-eb198b57e24a\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"de96fe9c-de3d-4cd7-a373-034a706f5263\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6499e3d0-bd65-40b3-8cf3-eb198b57e24a\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"a4ebe8ed-e799-4db6-a85e-44535a7ae456\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2013,\"zone\":\"Mountaineering Equipment\"}],\"color\":[\"#df5320\"],\"fill_alpha\":[0.8],\"height\":[3.0],\"label\":[{\"year\":2013,\"zone\":\"Mountaineering Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Mountaineering Equipment:0.8\"],\"y\":[1.5],\"year\":[2013],\"zone\":[\"Mountaineering Equipment\"]}},\"id\":\"d41f4806-8ebb-4693-8557-f47e41eabb5a\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2012,\"zone\":\"Mountaineering Equipment\"}],\"color\":[\"#407ee7\"],\"fill_alpha\":[0.8],\"height\":[3.0],\"label\":[{\"year\":2012,\"zone\":\"Mountaineering Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Mountaineering Equipment:0.6\"],\"y\":[1.5],\"year\":[2012],\"zone\":[\"Mountaineering Equipment\"]}},\"id\":\"372e324b-2d36-466a-88ba-8a48c37232a5\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6731b7ac-01f9-491d-85c5-0b750440f4c3\",\"type\":\"Rect\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"bd87cba4-8203-458d-a227-d36cae2ac6e1\",\"type\":\"BasicTicker\"}},\"id\":\"1b6c9451-be5c-42e8-81ac-21a05356a1b3\",\"type\":\"Grid\"},{\"attributes\":{\"plot\":null,\"text\":null},\"id\":\"5d9c3977-3f2d-40cf-8b2d-1a8e69db310e\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2010,\"zone\":\"Golf Equipment\"}],\"color\":[\"#f22c40\"],\"fill_alpha\":[0.8],\"height\":[1.0],\"label\":[{\"year\":2010,\"zone\":\"Golf Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Golf Equipment:0.2\"],\"y\":[0.5],\"year\":[2010],\"zone\":[\"Golf Equipment\"]}},\"id\":\"2a99a941-a936-4c2d-8867-3d4d01f9e646\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"unique_customers\",\"formatter\":{\"id\":\"616df7b8-3a88-4de3-9900-d68d07ba2dfa\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"bd87cba4-8203-458d-a227-d36cae2ac6e1\",\"type\":\"BasicTicker\"}},\"id\":\"b1c8b974-9374-4dd3-b230-0c0dcc9ac8d5\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"05a221f0-ab74-4548-bc87-19210933f92d\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2012,\"zone\":\"Personal Accessories\"}],\"color\":[\"#407ee7\"],\"fill_alpha\":[0.8],\"height\":[3.0],\"label\":[{\"year\":2012,\"zone\":\"Personal Accessories\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Personal Accessories:0.6\"],\"y\":[1.5],\"year\":[2012],\"zone\":[\"Personal Accessories\"]}},\"id\":\"a6279d61-e31d-44ad-93de-259e55eefa35\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2010,\"zone\":\"Mountaineering Equipment\"}],\"color\":[\"#f22c40\"],\"fill_alpha\":[0.8],\"height\":[1.0],\"label\":[{\"year\":2010,\"zone\":\"Mountaineering Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Mountaineering Equipment:0.2\"],\"y\":[0.5],\"year\":[2010],\"zone\":[\"Mountaineering Equipment\"]}},\"id\":\"c59b11ff-7a8a-4f15-96d6-7799ef71ed9d\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"0495155d-6ee2-434e-be19-ef821c025f07\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"5e307077-e76b-4579-99c7-e1c56f5fe27d\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d9f31009-2bcf-44ad-96ef-7db99161545f\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"36319ebd-f096-455a-8ff6-233a6f1f6d97\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d24076a5-426a-41de-9814-914302aad80d\",\"type\":\"Rect\"},{\"attributes\":{\"label\":{\"value\":\"2010\"},\"renderers\":[{\"id\":\"36319ebd-f096-455a-8ff6-233a6f1f6d97\",\"type\":\"GlyphRenderer\"}]},\"id\":\"ae366674-666a-4b51-a43c-bc96509d3de0\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"fab0026b-ebee-4c9a-94a8-fd3da38b6ecc\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"528266c2-d624-4e21-88ad-fd69188557fc\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"5e8242aa-3698-4e17-ae68-4a2054f72a30\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4c224e39-b512-496e-9051-ffdc3d8069d1\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"93b2adc9-c32d-40b0-aa64-67511b723bed\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d4e169e9-28eb-4c62-ab49-38ad5948dd06\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"49b53b75-9741-4201-bb4e-ebc882f1d699\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"430020c1-471b-426a-9b2b-1b4acb009b95\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5fc3d659-9628-48b9-9e72-ae00cf76e8b6\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"e8bd7f69-bfc3-428f-ba2b-e0b0ec27a090\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6b41112d-1c20-4464-addb-09e8de2117e1\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"3ab107d6-b6cb-41fa-aa3e-9c2cb35d5fa9\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"7c944c22-4e73-4e45-862d-ce9bb2b37162\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"f35e1ada-7a0a-4d46-b662-65bb69791fa7\",\"type\":\"Rect\"},{\"attributes\":{\"children\":[{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}]},\"id\":\"f26666cf-d39c-48ec-9fc9-3e35d10db888\",\"type\":\"Row\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2013,\"zone\":\"Outdoor Protection\"}],\"color\":[\"#df5320\"],\"fill_alpha\":[0.8],\"height\":[8.0],\"label\":[{\"year\":2013,\"zone\":\"Outdoor Protection\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Outdoor Protection:0.8\"],\"y\":[4.0],\"year\":[2013],\"zone\":[\"Outdoor Protection\"]}},\"id\":\"c2de666a-7eb0-4bbd-a3ee-73d717cd87de\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"2a99a941-a936-4c2d-8867-3d4d01f9e646\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"4c224e39-b512-496e-9051-ffdc3d8069d1\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"6ecbb55c-cee4-4147-b17d-14cac8b1b413\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2f42655f-3147-4580-b1a4-071a49715d2e\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2011,\"zone\":\"Camping Equipment\"}],\"color\":[\"#5ab738\"],\"fill_alpha\":[0.8],\"height\":[4.0],\"label\":[{\"year\":2011,\"zone\":\"Camping Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Camping Equipment:0.4\"],\"y\":[2.0],\"year\":[2011],\"zone\":[\"Camping Equipment\"]}},\"id\":\"93b2adc9-c32d-40b0-aa64-67511b723bed\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2013,\"zone\":\"Camping Equipment\"}],\"color\":[\"#df5320\"],\"fill_alpha\":[0.8],\"height\":[8.0],\"label\":[{\"year\":2013,\"zone\":\"Camping Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Camping Equipment:0.8\"],\"y\":[4.0],\"year\":[2013],\"zone\":[\"Camping Equipment\"]}},\"id\":\"b564beec-0935-481f-b21f-b1d9db69e95f\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"c59b11ff-7a8a-4f15-96d6-7799ef71ed9d\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"05a221f0-ab74-4548-bc87-19210933f92d\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"52675195-26a5-4cc2-8111-99e938cabb05\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2012,\"zone\":\"Golf Equipment\"}],\"color\":[\"#407ee7\"],\"fill_alpha\":[0.8],\"height\":[5.0],\"label\":[{\"year\":2012,\"zone\":\"Golf Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Golf Equipment:0.6\"],\"y\":[2.5],\"year\":[2012],\"zone\":[\"Golf Equipment\"]}},\"id\":\"e9625e16-1c78-43e9-9377-b7976cc1eec0\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"c2de666a-7eb0-4bbd-a3ee-73d717cd87de\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5bf2f5d9-cc1a-49ca-9bec-cb50aae5c4ed\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"7ee1c862-48ba-4e11-bb98-239e285b7113\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[{\"id\":\"2aead599-21d1-44ce-bb2d-5019534981c6\",\"type\":\"ToolbarBox\"},{\"id\":\"8cf0f517-a32a-43a1-9d82-1aee2fa47ab2\",\"type\":\"Column\"}]},\"id\":\"96e9aa5e-2a82-44dc-b9c6-d2bd832ec549\",\"type\":\"Column\"},{\"attributes\":{\"data_source\":{\"id\":\"e9625e16-1c78-43e9-9377-b7976cc1eec0\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d24076a5-426a-41de-9814-914302aad80d\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"d1422c25-fb9c-40f1-8197-0a831f57275f\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"end\":8.4},\"id\":\"fa4c1f4f-2d2d-4d63-83db-520367f5357a\",\"type\":\"Range1d\"},{\"attributes\":{\"data_source\":{\"id\":\"6c940398-59eb-4e94-ace2-0fbe4392d355\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6d4be7cf-814f-4fd2-bb9b-764a48f7bd7d\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"c92dda80-fb8e-49c8-8856-5f0f3f6daedc\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2011,\"zone\":\"Golf Equipment\"}],\"color\":[\"#5ab738\"],\"fill_alpha\":[0.8],\"height\":[5.0],\"label\":[{\"year\":2011,\"zone\":\"Golf Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Golf Equipment:0.4\"],\"y\":[2.5],\"year\":[2011],\"zone\":[\"Golf Equipment\"]}},\"id\":\"5a2c0034-8179-4160-abba-0f70ee4a7c2c\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"13270f5c-b6a1-4b3d-b4de-82267af74c8c\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"71c451eb-3e04-4d65-90de-d7312f969470\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"f35e1ada-7a0a-4d46-b662-65bb69791fa7\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"cc408bb0-1fde-44ce-ae25-e1519f0923ac\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"839a4f5d-69f7-4feb-bfe9-6131732ec1a9\",\"type\":\"ToolEvents\"},{\"attributes\":{\"sizing_mode\":\"scale_width\",\"toolbar_location\":\"above\",\"tools\":[{\"id\":\"c0a76d85-0820-4765-a5fe-f6f3100863e2\",\"type\":\"PanTool\"},{\"id\":\"b52b0200-c86d-4622-bc63-a9750c771ad6\",\"type\":\"WheelZoomTool\"},{\"id\":\"9fd5a308-8067-42d1-96ea-feaddee4fbad\",\"type\":\"BoxZoomTool\"},{\"id\":\"430020c1-471b-426a-9b2b-1b4acb009b95\",\"type\":\"SaveTool\"},{\"id\":\"32181aa3-a96b-4758-ac8c-656b19e8d189\",\"type\":\"ResetTool\"},{\"id\":\"f78215ba-cadc-42fb-92f9-eeed775aa4b5\",\"type\":\"HelpTool\"}]},\"id\":\"2aead599-21d1-44ce-bb2d-5019534981c6\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"data_source\":{\"id\":\"5fdb34cd-6584-43c9-8a96-182cde43202c\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d898e66c-0ba7-4daa-8efc-ca28d418d3b5\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"f6fe81d0-b46d-44e0-85fa-2d66a6c24b83\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2012,\"zone\":\"Outdoor Protection\"}],\"color\":[\"#407ee7\"],\"fill_alpha\":[0.8],\"height\":[5.0],\"label\":[{\"year\":2012,\"zone\":\"Outdoor Protection\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Outdoor Protection:0.6\"],\"y\":[2.5],\"year\":[2012],\"zone\":[\"Outdoor Protection\"]}},\"id\":\"71c451eb-3e04-4d65-90de-d7312f969470\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2010,\"zone\":\"Personal Accessories\"}],\"color\":[\"#f22c40\"],\"fill_alpha\":[0.8],\"height\":[2.0],\"label\":[{\"year\":2010,\"zone\":\"Personal Accessories\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Personal Accessories:0.2\"],\"y\":[1.0],\"year\":[2010],\"zone\":[\"Personal Accessories\"]}},\"id\":\"ae0aa2b8-eec6-47ba-a830-ca0f9a05adbe\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2011,\"zone\":\"Mountaineering Equipment\"}],\"color\":[\"#5ab738\"],\"fill_alpha\":[0.8],\"height\":[2.0],\"label\":[{\"year\":2011,\"zone\":\"Mountaineering Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Mountaineering Equipment:0.4\"],\"y\":[1.0],\"year\":[2011],\"zone\":[\"Mountaineering Equipment\"]}},\"id\":\"e8bd7f69-bfc3-428f-ba2b-e0b0ec27a090\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"items\":[{\"id\":\"ae366674-666a-4b51-a43c-bc96509d3de0\",\"type\":\"LegendItem\"},{\"id\":\"87adf272-2a5f-4888-8a5f-a863967f04e6\",\"type\":\"LegendItem\"},{\"id\":\"cd6a5087-7608-461b-b03c-dcb2ee0b636b\",\"type\":\"LegendItem\"},{\"id\":\"9f66a979-36e4-4f4a-83dc-3da0a08d3506\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"daeb5aef-d901-4cf8-ab9f-da2a1726d1c3\",\"type\":\"Legend\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d4e169e9-28eb-4c62-ab49-38ad5948dd06\",\"type\":\"Rect\"},{\"attributes\":{\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"b52b0200-c86d-4622-bc63-a9750c771ad6\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"f78215ba-cadc-42fb-92f9-eeed775aa4b5\",\"type\":\"HelpTool\"},{\"attributes\":{\"data_source\":{\"id\":\"ae0aa2b8-eec6-47ba-a830-ca0f9a05adbe\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"29e0455d-3cf2-486a-a001-b636b70aed03\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"5859cfaa-8d43-46de-8d69-779c7fb82a8b\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"c0a76d85-0820-4765-a5fe-f6f3100863e2\",\"type\":\"PanTool\"},{\"id\":\"b52b0200-c86d-4622-bc63-a9750c771ad6\",\"type\":\"WheelZoomTool\"},{\"id\":\"9fd5a308-8067-42d1-96ea-feaddee4fbad\",\"type\":\"BoxZoomTool\"},{\"id\":\"430020c1-471b-426a-9b2b-1b4acb009b95\",\"type\":\"SaveTool\"},{\"id\":\"32181aa3-a96b-4758-ac8c-656b19e8d189\",\"type\":\"ResetTool\"},{\"id\":\"f78215ba-cadc-42fb-92f9-eeed775aa4b5\",\"type\":\"HelpTool\"}]},\"id\":\"94be6425-665e-4c3b-a6a7-bb662b07123d\",\"type\":\"Toolbar\"},{\"attributes\":{\"data_source\":{\"id\":\"5a2c0034-8179-4160-abba-0f70ee4a7c2c\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"98e3ab3f-ed4f-4488-b485-b6e4d7499add\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"a03fbafc-2450-4408-a621-20aa45f0c052\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d898e66c-0ba7-4daa-8efc-ca28d418d3b5\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"bd87cba4-8203-458d-a227-d36cae2ac6e1\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"field\":\"fill_alpha\"},\"fill_color\":{\"field\":\"color\"},\"height\":{\"field\":\"height\",\"units\":\"data\"},\"line_color\":{\"field\":\"line_color\"},\"width\":{\"field\":\"width\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"528266c2-d624-4e21-88ad-fd69188557fc\",\"type\":\"Rect\"},{\"attributes\":{\"data_source\":{\"id\":\"d41f4806-8ebb-4693-8557-f47e41eabb5a\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5fc3d659-9628-48b9-9e72-ae00cf76e8b6\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"e648dc76-019e-4c26-a97c-304e73e43e27\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"7c944c22-4e73-4e45-862d-ce9bb2b37162\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"49575c96-2fdd-4cf9-80cc-edb40a445905\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"9fd5a308-8067-42d1-96ea-feaddee4fbad\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"291f2f5b-12bd-45f3-b0da-59fcb9826865\",\"type\":\"CategoricalTicker\"},{\"attributes\":{},\"id\":\"15ff5a81-ff0a-4327-a111-7f03e199c95d\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"label\":{\"value\":\"2012\"},\"renderers\":[{\"id\":\"e9e58ce1-5265-456b-b903-f636acb30867\",\"type\":\"GlyphRenderer\"}]},\"id\":\"cd6a5087-7608-461b-b03c-dcb2ee0b636b\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"4f12ee52-f460-4031-8919-f77bca1dd399\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"13270f5c-b6a1-4b3d-b4de-82267af74c8c\",\"type\":\"Rect\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"e9e58ce1-5265-456b-b903-f636acb30867\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2010,\"zone\":\"Camping Equipment\"}],\"color\":[\"#f22c40\"],\"fill_alpha\":[0.8],\"height\":[3.0],\"label\":[{\"year\":2010,\"zone\":\"Camping Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Camping Equipment:0.2\"],\"y\":[1.5],\"year\":[2010],\"zone\":[\"Camping Equipment\"]}},\"id\":\"5e307077-e76b-4579-99c7-e1c56f5fe27d\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"line_color\",\"line_alpha\",\"color\",\"fill_alpha\",\"height\",\"width\",\"y\",\"x\",\"label\"],\"data\":{\"chart_index\":[{\"year\":2012,\"zone\":\"Camping Equipment\"}],\"color\":[\"#407ee7\"],\"fill_alpha\":[0.8],\"height\":[5.0],\"label\":[{\"year\":2012,\"zone\":\"Camping Equipment\"}],\"line_alpha\":[1.0],\"line_color\":[\"white\"],\"width\":[0.2],\"x\":[\"Camping Equipment:0.6\"],\"y\":[2.5],\"year\":[2012],\"zone\":[\"Camping Equipment\"]}},\"id\":\"4f12ee52-f460-4031-8919-f77bca1dd399\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"96e9aa5e-2a82-44dc-b9c6-d2bd832ec549\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.4\"}};\n",
       "            var render_items = [{\"docid\":\"cd3a417b-b533-496f-9760-4a1f0ebbbe23\",\"elementid\":\"790c2f4a-ecac-4f5b-ab4f-15cd9d28c433\",\"modelid\":\"96e9aa5e-2a82-44dc-b9c6-d2bd832ec549\"}];\n",
       "            \n",
       "            Bokeh.embed.embed_items(docs_json, render_items);\n",
       "          };\n",
       "          if (document.readyState != \"loading\") fn();\n",
       "          else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "        })();\n",
       "      },\n",
       "      function(Bokeh) {\n",
       "      }\n",
       "    ];\n",
       "  \n",
       "    function run_inline_js() {\n",
       "      \n",
       "      if ((window.Bokeh !== undefined) || (force === true)) {\n",
       "        for (var i = 0; i < inline_js.length; i++) {\n",
       "          inline_js[i](window.Bokeh);\n",
       "        }if (force === true) {\n",
       "          display_loaded();\n",
       "        }} else if (Date.now() < window._bokeh_timeout) {\n",
       "        setTimeout(run_inline_js, 100);\n",
       "      } else if (!window._bokeh_failed_load) {\n",
       "        console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "        window._bokeh_failed_load = true;\n",
       "      } else if (force !== true) {\n",
       "        var cell = $(document.getElementById(\"790c2f4a-ecac-4f5b-ab4f-15cd9d28c433\")).parents('.cell').data().cell;\n",
       "        cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "      }\n",
       "  \n",
       "    }\n",
       "  \n",
       "    if (window._bokeh_is_loading === 0) {\n",
       "      console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "      run_inline_js();\n",
       "    } else {\n",
       "      load_libs(js_urls, function() {\n",
       "        console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "        run_inline_js();\n",
       "      });\n",
       "    }\n",
       "  }(this));\n",
       "</script>\n",
       "                    \n",
       "                \n",
       "        </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sparkSession = SparkSession.builder.getOrCreate()\n",
    "d1 = sparkSession.createDataFrame(\n",
    "[(2010, 'Camping Equipment', 3),\n",
    " (2010, 'Golf Equipment', 1),\n",
    " (2010, 'Mountaineering Equipment', 1),\n",
    " (2010, 'Outdoor Protection', 2),\n",
    " (2010, 'Personal Accessories', 2),\n",
    " (2011, 'Camping Equipment', 4),\n",
    " (2011, 'Golf Equipment', 5),\n",
    " (2011, 'Mountaineering Equipment',2),\n",
    " (2011, 'Outdoor Protection', 4),\n",
    " (2011, 'Personal Accessories', 2),\n",
    " (2012, 'Camping Equipment', 5),\n",
    " (2012, 'Golf Equipment', 5),\n",
    " (2012, 'Mountaineering Equipment', 3),\n",
    " (2012, 'Outdoor Protection', 5),\n",
    " (2012, 'Personal Accessories', 3),\n",
    " (2013, 'Camping Equipment', 8),\n",
    " (2013, 'Golf Equipment', 5),\n",
    " (2013, 'Mountaineering Equipment', 3),\n",
    " (2013, 'Outdoor Protection', 8),\n",
    " (2013, 'Personal Accessories', 4)],\n",
    "[\"year\",\"zone\",\"unique_customers\"])\n",
    "\n",
    "display(d1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example use of the Scala bridge\n",
    "Data scientists working with Spark may occasionaly need to call out to one of the hundreds of libraries available on spark-packages.org which are written in Scala or Java. PixieDust provides a solution to this problem by letting users directly write and run scala code in its own cell. It also lets variables be shared between Python and Scala and vice-versa. You can find more info at https://pixiedust.github.io/pixiedust/scalabridge.html."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Start by creating a python variable that we'll use in scala:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerce1ddc18\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistiece1ddc18\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamece1ddc18\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressce1ddc18\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerce1ddc18\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsce1ddc18\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentce1ddc18\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistiece1ddc18\").click(function(){\n",
       "    visible = $(\"#pm_containerce1ddc18\").is(':visible');\n",
       "    $(\"#pm_containerce1ddc18\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "python_var = \"Hello From Python\"\n",
    "python_num = 10"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Create scala code that use the python_var and create a new variable that we'll use in Python:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerbb839203\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistiebb839203\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamebb839203\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressbb839203\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerbb839203\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsbb839203\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentbb839203\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistiebb839203\").click(function(){\n",
       "    visible = $(\"#pm_containerbb839203\").is(':visible');\n",
       "    $(\"#pm_containerbb839203\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello From Python\n",
      "20\n"
     ]
    }
   ],
   "source": [
    "%%scala\n",
    "println(python_var)\n",
    "println(python_num+10)\n",
    "val __scala_var = \"Hello From Scala\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Use the __scala_var from python:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerfb4b2623\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistiefb4b2623\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamefb4b2623\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressfb4b2623\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerfb4b2623\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsfb4b2623\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentfb4b2623\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistiefb4b2623\").click(function(){\n",
       "    visible = $(\"#pm_containerfb4b2623\").is(':visible');\n",
       "    $(\"#pm_containerfb4b2623\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello From Scala\n"
     ]
    }
   ],
   "source": [
    "print(__scala_var)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# Sample Data\n",
    "PixieDust includes a number of sample data sets. You can use these sample data sets to start playing with the display() API and other PixieDust features. You can find more info at https://pixiedust.github.io/pixiedust/loaddata.html. Run the following cell to view the available data sets:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerf6239f3c\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistief6239f3c\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamef6239f3c\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressf6239f3c\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerf6239f3c\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsf6239f3c\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentf6239f3c\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistief6239f3c\").click(function(){\n",
       "    visible = $(\"#pm_containerf6239f3c\").is(':visible');\n",
       "    $(\"#pm_containerf6239f3c\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<table class=\"table table-hover pd_save\" style=\"font-size:small\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th align=\"center\" valign=\"middle\">Id</th>\n",
       "      <th>Name</th>\n",
       "      <th>Topic</th>\n",
       "      <th>Publisher</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  \n",
       "    <tr>\n",
       "        <td>1</td>\n",
       "        <td>Car performance data</td>\n",
       "        <td>transportation</td>\n",
       "        <td>IBM</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>2</td>\n",
       "        <td>Sample retail sales transactions, January 2009</td>\n",
       "        <td>Economy & Business</td>\n",
       "        <td>IBM Cloud Data Services</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>3</td>\n",
       "        <td>Total population by country</td>\n",
       "        <td>Society</td>\n",
       "        <td>IBM Cloud Data Services</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>4</td>\n",
       "        <td>GoSales Transactions for Naive Bayes Model</td>\n",
       "        <td>Leisure</td>\n",
       "        <td>IBM</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>5</td>\n",
       "        <td>Election results by County</td>\n",
       "        <td>Society</td>\n",
       "        <td>IBM</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>6</td>\n",
       "        <td>Million dollar home sales in NE Mass late 2016</td>\n",
       "        <td>Economy & Business</td>\n",
       "        <td>Redfin.com</td>\n",
       "    </tr>\n",
       "  \n",
       "    <tr>\n",
       "        <td>7</td>\n",
       "        <td>Boston Crime data, 2-week sample</td>\n",
       "        <td>Society</td>\n",
       "        <td>City of Boston</td>\n",
       "    </tr>\n",
       "  \n",
       "  </tbody>\n",
       "</table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pixiedust.sampleData()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example use of sample data\n",
    "To use sample data locally run the following cell to install required packages. You may need to restart your kernel after running this cell."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerfd943c91\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistiefd943c91\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamefd943c91\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressfd943c91\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerfd943c91\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsfd943c91\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentfd943c91\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistiefd943c91\").click(function(){\n",
       "    visible = $(\"#pm_containerfd943c91\").is(':visible');\n",
       "    $(\"#pm_containerfd943c91\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading package com.databricks:spark-csv_2.10:1.5.0 to /Users/mbrobergus.ibm.com/pixiedust/data/libs/spark-csv_2.10-1.5.0.jar\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>\n",
       "                    <span id=\"pm_label9e9aea1a\">Starting download...</span>\n",
       "                    <progress id=\"pm_progress9e9aea1a\" max=\"100\" value=\"0\" style=\"width:200px\"></progress>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 8192 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 4.95);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 16384 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 9.91);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 24576 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 14.86);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 32768 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 19.82);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 40960 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 24.77);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 49152 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 29.72);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 57344 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 34.68);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 65536 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 39.63);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 73728 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 44.59);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 81920 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 49.54);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 90112 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 54.49);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 98304 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 59.45);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 106496 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 64.4);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 114688 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 69.36);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 122880 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 74.31);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 131072 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 79.26);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 139264 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 84.22);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 147456 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 89.17);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 155648 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 94.13);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 163840 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 99.08);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label9e9aea1a\").text(\"Downloaded 165361 of 165361 bytes\");\n",
       "                    $(\"#pm_progress9e9aea1a\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Package com.databricks:spark-csv_2.10:1.5.0 downloaded successfully\n",
      "\u001b[31mPlease restart Kernel to complete installation of the new package\u001b[0m\n",
      "Successfully added package com.databricks:spark-csv_2.10:1.5.0\n",
      "Downloading package org.apache.commons:commons-csv:1.4 to /Users/mbrobergus.ibm.com/pixiedust/data/libs/commons-csv-1.4.jar\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>\n",
       "                    <span id=\"pm_label2dfd373c\">Starting download...</span>\n",
       "                    <progress id=\"pm_progress2dfd373c\" max=\"100\" value=\"0\" style=\"width:200px\"></progress>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label2dfd373c\").text(\"Downloaded 8192 of 39978 bytes\");\n",
       "                    $(\"#pm_progress2dfd373c\").attr(\"value\", 20.49);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label2dfd373c\").text(\"Downloaded 16384 of 39978 bytes\");\n",
       "                    $(\"#pm_progress2dfd373c\").attr(\"value\", 40.98);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label2dfd373c\").text(\"Downloaded 24576 of 39978 bytes\");\n",
       "                    $(\"#pm_progress2dfd373c\").attr(\"value\", 61.47);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label2dfd373c\").text(\"Downloaded 32768 of 39978 bytes\");\n",
       "                    $(\"#pm_progress2dfd373c\").attr(\"value\", 81.97);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label2dfd373c\").text(\"Downloaded 39978 of 39978 bytes\");\n",
       "                    $(\"#pm_progress2dfd373c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Package org.apache.commons:commons-csv:1.4 downloaded successfully\n",
      "\u001b[31mPlease restart Kernel to complete installation of the new package\u001b[0m\n",
      "Successfully added package org.apache.commons:commons-csv:1.4\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pixiedust.packageManager.package.Package at 0x11761bf90>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pixiedust.installPackage(\"com.databricks:spark-csv_2.10:1.5.0\")\n",
    "pixiedust.installPackage(\"org.apache.commons:commons-csv:0\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Run the following cell to get the first data set from the list. This will return a DataFrame and assign it to the variable d2:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainerbbb59631\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistiebbb59631\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobNamebbb59631\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgressbbb59631\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_containerbbb59631\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitorsbbb59631\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContentbbb59631\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistiebbb59631\").click(function(){\n",
       "    visible = $(\"#pm_containerbbb59631\").is(':visible');\n",
       "    $(\"#pm_containerbbb59631\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading 'Car performance data' from https://github.com/ibm-watson-data-lab/open-data/raw/master/cars/cars.csv\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>\n",
       "                    <span id=\"pm_label31e22a28\">Starting download...</span>\n",
       "                    <progress id=\"pm_progress31e22a28\" max=\"100\" value=\"0\" style=\"width:200px\"></progress>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label31e22a28\").text(\"Downloaded 8192 of 20954 bytes\");\n",
       "                    $(\"#pm_progress31e22a28\").attr(\"value\", 39.1);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label31e22a28\").text(\"Downloaded 16384 of 20954 bytes\");\n",
       "                    $(\"#pm_progress31e22a28\").attr(\"value\", 78.19);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_label31e22a28\").text(\"Downloaded 20954 of 20954 bytes\");\n",
       "                    $(\"#pm_progress31e22a28\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Creating pySpark DataFrame for 'Car performance data'. Please wait...\n"
     ]
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "\n",
       "$(\"#pm_containerbbb59631\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 2 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainerbbb59631\").show();\n",
       "$(\"#pm_overallJobNamebbb59631\").text(jobName);\n",
       "$(\"#pm_overallProgressbbb59631\").attr(\"max\", 1).attr(\"value\",0);\n",
       "$(\"#progressMonitorsbbb59631\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menubbb596312\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContentbbb59631\").append(\n",
       "'<div id=\"menubbb596312\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 5 <span id=\"progressNumTaskbbb596315\">0</span>/1:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progressbbb596315\" max=\"1\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"hostbbb596315\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"statusbbb596315\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menubbb596312\"]').tab('show');\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Successfully created pySpark DataFrame for 'Car performance data'\n"
     ]
    },
    {
     "data": {
      "application/javascript": [
       "$(\"#statusbbb596315\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 1);\n",
       "}\n",
       "incProgress(\"#progressbbb596315\");\n",
       "incProgress(\"#pm_overallProgressbbb59631\");\n",
       "$(\"#progressNumTaskbbb596315\").text(\"1\");\n",
       "$(\"#statusbbb596315\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#hostbbb596315\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#statusbbb596315\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menubbb596312 [id^=statusbbb59631]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgressbbb59631\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n",
       "\n",
       "\n",
       "$(\"#pm_containerbbb59631\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 3 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainerbbb59631\").show();\n",
       "$(\"#pm_overallJobNamebbb59631\").text(jobName);\n",
       "$(\"#pm_overallProgressbbb59631\").attr(\"max\", 1).attr(\"value\",0);\n",
       "$(\"#progressMonitorsbbb59631\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menubbb596313\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContentbbb59631\").append(\n",
       "'<div id=\"menubbb596313\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 6 <span id=\"progressNumTaskbbb596316\">0</span>/1:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progressbbb596316\" max=\"1\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"hostbbb596316\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"statusbbb596316\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menubbb596313\"]').tab('show');\n",
       "$(\"#statusbbb596316\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 1);\n",
       "}\n",
       "incProgress(\"#progressbbb596316\");\n",
       "incProgress(\"#pm_overallProgressbbb59631\");\n",
       "$(\"#progressNumTaskbbb596316\").text(\"1\");\n",
       "$(\"#statusbbb596316\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#hostbbb596316\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#statusbbb596316\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menubbb596313 [id^=statusbbb59631]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgressbbb59631\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n",
       "\n",
       "\n",
       "$(\"#pm_containerbbb59631\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 4 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainerbbb59631\").show();\n",
       "$(\"#pm_overallJobNamebbb59631\").text(jobName);\n",
       "$(\"#pm_overallProgressbbb59631\").attr(\"max\", 2).attr(\"value\",0);\n",
       "$(\"#progressMonitorsbbb59631\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menubbb596314\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContentbbb59631\").append(\n",
       "'<div id=\"menubbb596314\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 7 <span id=\"progressNumTaskbbb596317\">0</span>/2:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progressbbb596317\" max=\"2\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"hostbbb596317\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"statusbbb596317\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menubbb596314\"]').tab('show');\n",
       "$(\"#statusbbb596317\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 2);\n",
       "}\n",
       "incProgress(\"#progressbbb596317\");\n",
       "incProgress(\"#pm_overallProgressbbb59631\");\n",
       "$(\"#progressNumTaskbbb596317\").text(\"2\");\n",
       "$(\"#statusbbb596317\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#hostbbb596317\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#statusbbb596317\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menubbb596314 [id^=statusbbb59631]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgressbbb59631\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "d2 = pixiedust.sampleData(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pass the sample data set (d2) into the display() API:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false,
    "pixiedust": {
     "displayParams": {
      "handlerId": "dataframe"
     }
    },
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"pixiedust\" pixiedust=\"{&quot;prefix&quot;: &quot;2523b2f1&quot;, &quot;command&quot;: &quot;display(d2,cell_id=&apos;172D650A866A4E3480E3B228CDB116F7&apos;,nostore_pixiedust=&apos;true&apos;,handlerId=&apos;dataframe&apos;,nostore_cw=&apos;1098&apos;,org_params=&apos;nostore_pixiedust&apos;,nostore_bokeh=&apos;true&apos;)&quot;, &quot;options&quot;: {&quot;cell_id&quot;: &quot;172D650A866A4E3480E3B228CDB116F7&quot;, &quot;org_params&quot;: &quot;nostore_pixiedust&quot;, &quot;nostore_cw&quot;: &quot;1098&quot;, &quot;handlerId&quot;: &quot;dataframe&quot;, &quot;nostore_bokeh&quot;: &quot;true&quot;, &quot;nostore_pixiedust&quot;: &quot;true&quot;, &quot;showchrome&quot;: &quot;true&quot;}}\">\n",
       "  <button class=\"btn btn-default btn-sm expandButton\" data-toggle=\"collapse\"\n",
       "          data-target=\"#pixiedust-output-wrapper-2523b2f1\" title=\"Expand/Collapse Pixiedust output\">\n",
       "    <i class=\"fa\"></i>\n",
       "  </button>\n",
       "  <div id=\"pixiedust-output-wrapper-2523b2f1\" class=\"pixiedust-output-wrapper collapse in\">\n",
       "    \n",
       "      <div class=\"pixiedust-toolbar btn-group\" role=\"group\" style=\"margin-bottom:15px\">  \n",
       "      \n",
       "        \n",
       "          <a class=\"btn btn-small btn-default display-type-button\" id=\"menu2523b2f1-dataframe\" title=\"DataFrame Table\">\n",
       "            <i class=\"fa fa-table\"></i>\n",
       "          </a>\n",
       "          \n",
       "            <script>\n",
       "                $('#menu2523b2f1-dataframe').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='dataframe',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "        \n",
       "      \n",
       "        \n",
       "          <div class=\"btn-group btn-small display-type-button\">\n",
       "            \n",
       "            <a class=\"btn btn-small dropdown-toggle btn-default\" data-toggle=\"dropdown\" title=\"Chart\">\n",
       "              \n",
       "              <i class=\"fa fa-line-chart\"></i>\n",
       "              \n",
       "              <i class=\"fa fa-chevron-down\"></i>\n",
       "            </a>\n",
       "            <div class=\"dropdown-menu\" role=\"menu\" style=\"white-space:nowrap\">\n",
       "              <ul>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-barChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-bar-chart\"></i>\n",
       "                  \n",
       "                  <span>Bar Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-barChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='barChart',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-lineChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-line-chart\"></i>\n",
       "                  \n",
       "                  <span>Line Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-lineChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='lineChart',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-scatterPlot\">\n",
       "                  \n",
       "                  <i class=\"fa fa-circle\"></i>\n",
       "                  \n",
       "                  <span>Scatter Plot</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-scatterPlot').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='scatterPlot',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-pieChart\">\n",
       "                  \n",
       "                  <i class=\"fa fa-pie-chart\"></i>\n",
       "                  \n",
       "                  <span>Pie Chart</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-pieChart').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='pieChart',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-mapView\">\n",
       "                  \n",
       "                  <i class=\"fa fa-globe\"></i>\n",
       "                  \n",
       "                  <span>Map</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-mapView').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='mapView',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-histogram\">\n",
       "                  \n",
       "                  <i class=\"fa fa-table\"></i>\n",
       "                  \n",
       "                  <span>Histogram</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-histogram').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='histogram',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "              </ul>\n",
       "            </div>\n",
       "          </div>\n",
       "        \n",
       "      \n",
       "        \n",
       "      \n",
       "        \n",
       "      \n",
       "        \n",
       "          <div class=\"btn-group btn-small display-type-button\">\n",
       "            \n",
       "            <a class=\"btn btn-small dropdown-toggle btn-default\" data-toggle=\"dropdown\" title=\"Stash dataset\">\n",
       "              \n",
       "              <i class=\"fa fa-cloud-download\"></i>\n",
       "              \n",
       "              <i class=\"fa fa-chevron-down\"></i>\n",
       "            </a>\n",
       "            <div class=\"dropdown-menu\" role=\"menu\" style=\"white-space:nowrap\">\n",
       "              <ul>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-downloadFile\">\n",
       "                  \n",
       "                  <i class=\"fa fa-download\"></i>\n",
       "                  \n",
       "                  <span>Download as File</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-downloadFile').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='downloadFile',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "                <li id=\"menu2523b2f1-stashCloudant\">\n",
       "                  \n",
       "                  <i class=\"fa fa-cloud\"></i>\n",
       "                  \n",
       "                  <span>Stash to Cloudant</span>\n",
       "                  \n",
       "            <script>\n",
       "                $('#menu2523b2f1-stashCloudant').on('click', \n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='stashCloudant',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")\n",
       "            </script>\n",
       "        \n",
       "                </li>\n",
       "              \n",
       "              </ul>\n",
       "            </div>\n",
       "          </div>\n",
       "        \n",
       "      \n",
       "      </div>\n",
       "    \n",
       "    <div id=\"wrapperJS2523b2f1\"></div>\n",
       "    <div id=\"wrapperHTML2523b2f1\" class=\"pixiedustWrapperHTML\" style=\"min-height:100px\"></div>\n",
       "  </div>\n",
       "</div>\n",
       "                    <script>\n",
       "                    (\n",
       "\n",
       "\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2523b2f1');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2523b2f1');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"172D650A866A4E3480E3B228CDB116F7\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2523b2f1\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "\n",
       "                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\n",
       "                            setTimeout(function(){\n",
       "                                var data = JSON.parse(JSON.stringify(content.data));\n",
       "                                if(!!data[\"text/html\"])data[\"text/html\"]=html;\n",
       "                                function savedData(data){\n",
       "                                    \n",
       "                                    var markup='<style type=\"text/css\">.pd_warning{display:none;}</style>';\n",
       "                                    markup+='<div class=\"pd_warning\"><em>Hey, there\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\n",
       "                                    nodes = $.parseHTML(data[\"text/html\"], null, true);\n",
       "                                    var s = $(nodes).wrap(\"<div>\").parent().find(\".pd_save\").not(\".pd_save .pd_save\")\n",
       "                                    s.each(function(){\n",
       "                                        var found = false;\n",
       "                                        if ( $(this).attr(\"id\") ){\n",
       "                                            var n = $(\"#\" + $(this).attr(\"id\"));\n",
       "                                            if (n.length>0){\n",
       "                                                found=true;\n",
       "                                                n.each(function(){\n",
       "                                                    $(this).addClass(\"is-viewer-good\");\n",
       "                                                });\n",
       "                                                markup+=n.wrap(\"<div>\").parent().html();\n",
       "                                            }\n",
       "                                        }else{\n",
       "                                            $(this).addClass(\"is-viewer-good\");\n",
       "                                        }\n",
       "                                        if (!found){\n",
       "                                            markup+=$(this).parent().html();\n",
       "                                        }\n",
       "                                    });\n",
       "                                    data[\"text/html\"] = markup;\n",
       "                                    return data;\n",
       "                                }\n",
       "                                curCell.output_area.outputs.push({\"data\": savedData(data),\"metadata\":content.metadata,\"output_type\":msg_type});\n",
       "                            },2000);\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2523b2f1\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2523b2f1\").length > 0 ){\n",
       "                    $(\"#execution2523b2f1\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2523b2f1 != \"undefined\"){\n",
       "                    onDisplayDone2523b2f1();\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(d2,cell_id='172D650A866A4E3480E3B228CDB116F7',nostore_pixiedust='true',handlerId='dataframe',nostore_cw='1098',org_params='nostore_pixiedust',nostore_bokeh='true',prefix='2523b2f1')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('False'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "    \n",
       "\n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2523b2f1').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       ")();\n",
       "                    </script>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">.pd_warning{display:none;}</style><div class=\"pd_warning\"><em>Hey, there's something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div><style type=\"text/css\" class=\"pd_save is-viewer-good\">\n",
       "  .df-table-wrapper .panel-heading {\n",
       "    border-radius: 0;\n",
       "    padding: 0px;\n",
       "  }\n",
       "  .df-table-wrapper .panel-heading:hover {\n",
       "    border-color: #008571;\n",
       "  }\n",
       "  .df-table-wrapper .panel-title a {\n",
       "    background-color: #f9f9fb;\n",
       "    color: #333333;\n",
       "    display: block;\n",
       "    outline: none;\n",
       "    padding: 10px 15px;\n",
       "    text-decoration: none;\n",
       "  }\n",
       "  .df-table-wrapper .panel-title a:hover {\n",
       "    background-color: #337ab7;\n",
       "    border-color: #2e6da4;\n",
       "    color: #ffffff;\n",
       "    display: block;\n",
       "    padding: 10px 15px;\n",
       "    text-decoration: none;\n",
       "  }\n",
       "  .df-table-wrapper {\n",
       "    font-size: small;\n",
       "    font-weight: 300;\n",
       "    letter-spacing: 0.5px;\n",
       "    line-height: normal;\n",
       "  }\n",
       "  .df-table-search-count {\n",
       "    display: inline-block;\n",
       "    margin: 20px 0;\n",
       "  }\n",
       "  .df-table-container {\n",
       "    max-height: 50vh;\n",
       "    max-width: 100%;\n",
       "    overflow-x: auto;\n",
       "    position: relative;\n",
       "  }\n",
       "  .df-table-wrapper table {\n",
       "    border: 0 none #ffffff;\n",
       "    border-collapse: collapse;\n",
       "    margin: 0;\n",
       "    min-width: 100%;\n",
       "    padding: 0;\n",
       "    table-layout: fixed;\n",
       "  }\n",
       "  .df-table-wrapper tr.hidden {\n",
       "    display: none;\n",
       "  }\n",
       "  .df-table-wrapper tr:nth-child(even) {\n",
       "    background-color: #f9f9fb;\n",
       "  }\n",
       "  .df-table-wrapper tr.even {\n",
       "    background-color: #f9f9fb;\n",
       "  }\n",
       "  .df-table-wrapper tr.odd {\n",
       "    background-color: #ffffff;\n",
       "  }\n",
       "  .df-table-wrapper td + td {\n",
       "    border-left: 1px solid #e0e0e0;\n",
       "  }\n",
       "\n",
       "  .df-table-wrapper thead,\n",
       "  .fixed-header {\n",
       "    color: #337ab7;\n",
       "    font-family: monospace;\n",
       "  }\n",
       "  .df-table-wrapper tr,\n",
       "  .fixed-row {\n",
       "    border: 0 none #ffffff;\n",
       "    margin: 0;\n",
       "    padding: 0;\n",
       "  }\n",
       "  .df-table-wrapper th,\n",
       "  .df-table-wrapper td,\n",
       "  .fixed-cell {\n",
       "    border: 0 none #ffffff;\n",
       "    margin: 0;\n",
       "    min-width: 50px;\n",
       "    padding: 5px 20px 5px 10px;\n",
       "    text-align: left;\n",
       "    word-wrap: break-word;\n",
       "  }\n",
       "  .df-table-wrapper th {\n",
       "    padding-bottom: 0;\n",
       "    padding-top: 0;\n",
       "  }\n",
       "  .df-table-wrapper th div {\n",
       "    max-height: 1px;\n",
       "    visibility: hidden;\n",
       "  }\n",
       "\n",
       "  .df-schema-field {\n",
       "    margin-left: 10px;\n",
       "  }\n",
       "\n",
       "  .fixed-header-container {\n",
       "    overflow: hidden;\n",
       "    position: relative;\n",
       "  }\n",
       "  .fixed-header {\n",
       "    border-bottom: 2px solid #2e6da4;\n",
       "    display: table;\n",
       "    position: relative;\n",
       "  }\n",
       "  .fixed-row {\n",
       "    display: table-row;\n",
       "  }\n",
       "  .fixed-cell {\n",
       "    display: table-cell;\n",
       "  }\n",
       "</style><div class=\"df-table-wrapper df-table-wrapper-2523b2f1 panel-group pd_save is-viewer-good\">\n",
       "  <!-- dataframe schema -->\n",
       "  \n",
       "  <div class=\"panel panel-default\">\n",
       "    <div class=\"panel-heading\">\n",
       "      <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "        <a data-toggle=\"collapse\" href=\"#df-schema-2523b2f1\" data-parent=\"#df-table-wrapper-2523b2f1\">Schema</a>\n",
       "      </h4>\n",
       "    </div>\n",
       "    <div id=\"df-schema-2523b2f1\" class=\"panel-collapse collapse\">\n",
       "      <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "        <div class=\"df-schema-type\">\n",
       "          <span>type: </span><span>struct</span>\n",
       "        </div>\n",
       "        <div class=\"df-schema-fields\">\n",
       "          <div>field:</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'double', 'name': 'mpg', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'integer', 'name': 'cylinders', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'double', 'name': 'engine', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'integer', 'name': 'horsepower', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'integer', 'name': 'weight', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'double', 'name': 'acceleration', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'integer', 'name': 'year', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'string', 'name': 'origin', 'nullable': True}</div>\n",
       "          \n",
       "            <div class=\"df-schema-field\">{'metadata': {}, 'type': 'string', 'name': 'name', 'nullable': True}</div>\n",
       "          \n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <!-- dataframe table -->\n",
       "  <div class=\"panel panel-default\">\n",
       "    \n",
       "    <div class=\"panel-heading\">\n",
       "      <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "        <a data-toggle=\"collapse\" href=\"#df-table-2523b2f1\" data-parent=\"#df-table-wrapper-2523b2f1\">Table</a>\n",
       "      </h4>\n",
       "    </div>\n",
       "    \n",
       "    <div id=\"df-table-2523b2f1\" class=\"panel-collapse collapse in\">\n",
       "      <div class=\"panel-body\">\n",
       "        \n",
       "        <input class=\"df-table-search form-control input-sm\" placeholder=\"Search table\" type=\"text\">\n",
       "        <div>\n",
       "          <span class=\"df-table-search-count\">Showing 100 of 406</span>\n",
       "        </div>\n",
       "        <!-- fixed header for when dataframe table scrolls -->\n",
       "        <div class=\"fixed-header-container\">\n",
       "          <div class=\"fixed-header\">\n",
       "            <div class=\"fixed-row\">\n",
       "              \n",
       "              <div class=\"fixed-cell\">mpg</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">cylinders</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">engine</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">horsepower</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">weight</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">acceleration</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">year</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">origin</div>\n",
       "              \n",
       "              <div class=\"fixed-cell\">name</div>\n",
       "              \n",
       "            </div>\n",
       "          </div>\n",
       "        </div>\n",
       "        <div class=\"df-table-container\">\n",
       "          <table class=\"df-table\">\n",
       "            <thead>\n",
       "              <tr>\n",
       "                \n",
       "                <th><div>mpg</div></th>\n",
       "                \n",
       "                <th><div>cylinders</div></th>\n",
       "                \n",
       "                <th><div>engine</div></th>\n",
       "                \n",
       "                <th><div>horsepower</div></th>\n",
       "                \n",
       "                <th><div>weight</div></th>\n",
       "                \n",
       "                <th><div>acceleration</div></th>\n",
       "                \n",
       "                <th><div>year</div></th>\n",
       "                \n",
       "                <th><div>origin</div></th>\n",
       "                \n",
       "                <th><div>name</div></th>\n",
       "                \n",
       "              </tr>\n",
       "            </thead>\n",
       "            <tbody>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>307.0</td>\n",
       "                \n",
       "                <td>130</td>\n",
       "                \n",
       "                <td>3504</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet chevelle malibu</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>165</td>\n",
       "                \n",
       "                <td>3693</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>buick skylark 320</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3436</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth satellite</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>304.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3433</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc rebel sst</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>302.0</td>\n",
       "                \n",
       "                <td>140</td>\n",
       "                \n",
       "                <td>3449</td>\n",
       "                \n",
       "                <td>10.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford torino</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>429.0</td>\n",
       "                \n",
       "                <td>198</td>\n",
       "                \n",
       "                <td>4341</td>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford galaxie 500</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>454.0</td>\n",
       "                \n",
       "                <td>220</td>\n",
       "                \n",
       "                <td>4354</td>\n",
       "                \n",
       "                <td>9.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet impala</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>440.0</td>\n",
       "                \n",
       "                <td>215</td>\n",
       "                \n",
       "                <td>4312</td>\n",
       "                \n",
       "                <td>8.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth fury iii</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>455.0</td>\n",
       "                \n",
       "                <td>225</td>\n",
       "                \n",
       "                <td>4425</td>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac catalina</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>390.0</td>\n",
       "                \n",
       "                <td>190</td>\n",
       "                \n",
       "                <td>3850</td>\n",
       "                \n",
       "                <td>8.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc ambassador dpl</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>165</td>\n",
       "                \n",
       "                <td>4142</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet chevelle concours (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>351.0</td>\n",
       "                \n",
       "                <td>153</td>\n",
       "                \n",
       "                <td>4034</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford torino (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>383.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>4166</td>\n",
       "                \n",
       "                <td>10.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth satellite (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>360.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>3850</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc rebel sst (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>383.0</td>\n",
       "                \n",
       "                <td>170</td>\n",
       "                \n",
       "                <td>3563</td>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge challenger se</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>340.0</td>\n",
       "                \n",
       "                <td>160</td>\n",
       "                \n",
       "                <td>3609</td>\n",
       "                \n",
       "                <td>8.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth cuda 340</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>302.0</td>\n",
       "                \n",
       "                <td>140</td>\n",
       "                \n",
       "                <td>3353</td>\n",
       "                \n",
       "                <td>8.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford mustang boss 302</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3761</td>\n",
       "                \n",
       "                <td>9.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet monte carlo</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>455.0</td>\n",
       "                \n",
       "                <td>225</td>\n",
       "                \n",
       "                <td>3086</td>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>buick estate wagon (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>22.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>198.0</td>\n",
       "                \n",
       "                <td>95</td>\n",
       "                \n",
       "                <td>2833</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth duster</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>199.0</td>\n",
       "                \n",
       "                <td>97</td>\n",
       "                \n",
       "                <td>2774</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc hornet</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>200.0</td>\n",
       "                \n",
       "                <td>85</td>\n",
       "                \n",
       "                <td>2587</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford maverick</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>199.0</td>\n",
       "                \n",
       "                <td>90</td>\n",
       "                \n",
       "                <td>2648</td>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc gremlin</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>360.0</td>\n",
       "                \n",
       "                <td>215</td>\n",
       "                \n",
       "                <td>4615</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford f250</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>10.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>307.0</td>\n",
       "                \n",
       "                <td>200</td>\n",
       "                \n",
       "                <td>4376</td>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevy c20</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>210</td>\n",
       "                \n",
       "                <td>4382</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge d200</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>9.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>304.0</td>\n",
       "                \n",
       "                <td>193</td>\n",
       "                \n",
       "                <td>4732</td>\n",
       "                \n",
       "                <td>18.5</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>hi 1200d</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>28.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>140.0</td>\n",
       "                \n",
       "                <td>90</td>\n",
       "                \n",
       "                <td>2264</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet vega 2300</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>25.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>98.0</td>\n",
       "                \n",
       "                <td>80</td>\n",
       "                \n",
       "                <td>2046</td>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford pinto</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>232.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>2634</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc gremlin</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>225.0</td>\n",
       "                \n",
       "                <td>105</td>\n",
       "                \n",
       "                <td>3439</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth satellite custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>3329</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet chevelle malibu</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>88</td>\n",
       "                \n",
       "                <td>3302</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford torino 500</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>232.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>3288</td>\n",
       "                \n",
       "                <td>15.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc matador</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>165</td>\n",
       "                \n",
       "                <td>4209</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet impala</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>4464</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac catalina brougham</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>351.0</td>\n",
       "                \n",
       "                <td>153</td>\n",
       "                \n",
       "                <td>4154</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford galaxie 500</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4096</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth fury iii</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>383.0</td>\n",
       "                \n",
       "                <td>180</td>\n",
       "                \n",
       "                <td>4955</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge monaco (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>170</td>\n",
       "                \n",
       "                <td>4746</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford country squire (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>5140</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac safari (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>258.0</td>\n",
       "                \n",
       "                <td>110</td>\n",
       "                \n",
       "                <td>2962</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc hornet sportabout (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>22.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>140.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>2408</td>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet vega (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>3282</td>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac firebird</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>88</td>\n",
       "                \n",
       "                <td>3139</td>\n",
       "                \n",
       "                <td>14.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford mustang</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>23.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>122.0</td>\n",
       "                \n",
       "                <td>86</td>\n",
       "                \n",
       "                <td>2220</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>mercury capri 2000</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>26.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>91.0</td>\n",
       "                \n",
       "                <td>70</td>\n",
       "                \n",
       "                <td>1955</td>\n",
       "                \n",
       "                <td>20.5</td>\n",
       "                \n",
       "                <td>71</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth cricket</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>25.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>97.5</td>\n",
       "                \n",
       "                <td>80</td>\n",
       "                \n",
       "                <td>2126</td>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge colt hardtop</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>20.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>140.0</td>\n",
       "                \n",
       "                <td>90</td>\n",
       "                \n",
       "                <td>2408</td>\n",
       "                \n",
       "                <td>19.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet vega</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>122.0</td>\n",
       "                \n",
       "                <td>86</td>\n",
       "                \n",
       "                <td>2226</td>\n",
       "                \n",
       "                <td>16.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford pinto runabout</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>165</td>\n",
       "                \n",
       "                <td>4274</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet impala</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>4385</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac catalina</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4135</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth fury iii</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>351.0</td>\n",
       "                \n",
       "                <td>153</td>\n",
       "                \n",
       "                <td>4129</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford galaxie 500</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>304.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3672</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc ambassador sst</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>429.0</td>\n",
       "                \n",
       "                <td>208</td>\n",
       "                \n",
       "                <td>4633</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>mercury marquis</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>155</td>\n",
       "                \n",
       "                <td>4502</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>buick lesabre custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>160</td>\n",
       "                \n",
       "                <td>4456</td>\n",
       "                \n",
       "                <td>13.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>oldsmobile delta 88 royale</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>190</td>\n",
       "                \n",
       "                <td>4422</td>\n",
       "                \n",
       "                <td>12.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chrysler newport royal</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>304.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3892</td>\n",
       "                \n",
       "                <td>12.5</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc matador (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>307.0</td>\n",
       "                \n",
       "                <td>130</td>\n",
       "                \n",
       "                <td>4098</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet chevelle concours (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>302.0</td>\n",
       "                \n",
       "                <td>140</td>\n",
       "                \n",
       "                <td>4294</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford gran torino (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4077</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth satellite custom (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>22.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>122.0</td>\n",
       "                \n",
       "                <td>86</td>\n",
       "                \n",
       "                <td>2395</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford pinto (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>28.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>98.0</td>\n",
       "                \n",
       "                <td>80</td>\n",
       "                \n",
       "                <td>2164</td>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge colt (sw)</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>4100</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>buick century 350</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>304.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3672</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc matador</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>145</td>\n",
       "                \n",
       "                <td>3988</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet malibu</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>302.0</td>\n",
       "                \n",
       "                <td>137</td>\n",
       "                \n",
       "                <td>4042</td>\n",
       "                \n",
       "                <td>14.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford gran torino</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3777</td>\n",
       "                \n",
       "                <td>12.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge coronet custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>429.0</td>\n",
       "                \n",
       "                <td>198</td>\n",
       "                \n",
       "                <td>4952</td>\n",
       "                \n",
       "                <td>11.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>mercury marquis brougham</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4464</td>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet caprice classic</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>351.0</td>\n",
       "                \n",
       "                <td>158</td>\n",
       "                \n",
       "                <td>4363</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford ltd</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4237</td>\n",
       "                \n",
       "                <td>14.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth fury gran sedan</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>440.0</td>\n",
       "                \n",
       "                <td>215</td>\n",
       "                \n",
       "                <td>4735</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chrysler new yorker brougham</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>455.0</td>\n",
       "                \n",
       "                <td>225</td>\n",
       "                \n",
       "                <td>4951</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>buick electra 225 custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>360.0</td>\n",
       "                \n",
       "                <td>175</td>\n",
       "                \n",
       "                <td>3821</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc ambassador brougham</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>225.0</td>\n",
       "                \n",
       "                <td>105</td>\n",
       "                \n",
       "                <td>3121</td>\n",
       "                \n",
       "                <td>16.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth valiant</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>3278</td>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet nova custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>232.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>2945</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc hornet</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>88</td>\n",
       "                \n",
       "                <td>3021</td>\n",
       "                \n",
       "                <td>16.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford maverick</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>23.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>198.0</td>\n",
       "                \n",
       "                <td>95</td>\n",
       "                \n",
       "                <td>2904</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth duster</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>4997</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet impala</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>167</td>\n",
       "                \n",
       "                <td>4906</td>\n",
       "                \n",
       "                <td>12.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford country</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>360.0</td>\n",
       "                \n",
       "                <td>170</td>\n",
       "                \n",
       "                <td>4654</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth custom suburb</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>12.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>180</td>\n",
       "                \n",
       "                <td>4499</td>\n",
       "                \n",
       "                <td>12.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>oldsmobile vista cruiser</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>18.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>232.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>2789</td>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc gremlin</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>140.0</td>\n",
       "                \n",
       "                <td>72</td>\n",
       "                \n",
       "                <td>2401</td>\n",
       "                \n",
       "                <td>19.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet vega</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>122.0</td>\n",
       "                \n",
       "                <td>85</td>\n",
       "                \n",
       "                <td>2310</td>\n",
       "                \n",
       "                <td>18.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford pinto</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>155.0</td>\n",
       "                \n",
       "                <td>107</td>\n",
       "                \n",
       "                <td>2472</td>\n",
       "                \n",
       "                <td>14.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>mercury capri v6</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>145</td>\n",
       "                \n",
       "                <td>4082</td>\n",
       "                \n",
       "                <td>13.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet monte carlo s</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>400.0</td>\n",
       "                \n",
       "                <td>230</td>\n",
       "                \n",
       "                <td>4278</td>\n",
       "                \n",
       "                <td>9.5</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>pontiac grand prix</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>318.0</td>\n",
       "                \n",
       "                <td>150</td>\n",
       "                \n",
       "                <td>3399</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>dodge dart custom</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>8</td>\n",
       "                \n",
       "                <td>350.0</td>\n",
       "                \n",
       "                <td>180</td>\n",
       "                \n",
       "                <td>3664</td>\n",
       "                \n",
       "                <td>11.0</td>\n",
       "                \n",
       "                <td>73</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>oldsmobile omega</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>20.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>198.0</td>\n",
       "                \n",
       "                <td>95</td>\n",
       "                \n",
       "                <td>3102</td>\n",
       "                \n",
       "                <td>16.5</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>plymouth duster</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>21.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>200.0</td>\n",
       "                \n",
       "                <td>160</td>\n",
       "                \n",
       "                <td>2875</td>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford maverick</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>19.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>232.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>2901</td>\n",
       "                \n",
       "                <td>16.0</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>amc hornet</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>15.0</td>\n",
       "                \n",
       "                <td>6</td>\n",
       "                \n",
       "                <td>250.0</td>\n",
       "                \n",
       "                <td>100</td>\n",
       "                \n",
       "                <td>3336</td>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet nova</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>26.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>122.0</td>\n",
       "                \n",
       "                <td>80</td>\n",
       "                \n",
       "                <td>2451</td>\n",
       "                \n",
       "                <td>16.5</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>ford pinto</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "              <tr>\n",
       "                \n",
       "                <td>25.0</td>\n",
       "                \n",
       "                <td>4</td>\n",
       "                \n",
       "                <td>140.0</td>\n",
       "                \n",
       "                <td>75</td>\n",
       "                \n",
       "                <td>2542</td>\n",
       "                \n",
       "                <td>17.0</td>\n",
       "                \n",
       "                <td>74</td>\n",
       "                \n",
       "                <td>American</td>\n",
       "                \n",
       "                <td>chevrolet vega</td>\n",
       "                \n",
       "              </tr>\n",
       "              \n",
       "            </tbody>\n",
       "          </table>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "</div><script class=\"pd_save is-viewer-good\">\n",
       "  $(function() {\n",
       "    var tableWrapper = $('.df-table-wrapper-2523b2f1');\n",
       "    var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "    var tableContainer = $('.df-table-container', tableWrapper);\n",
       "    var table = $('.df-table', tableContainer);\n",
       "    var rows = $('tbody > tr', table);\n",
       "    var total = 406;\n",
       "\n",
       "    fixedHeader\n",
       "      .css('width', table.width())\n",
       "      .find('.fixed-cell')\n",
       "      .each(function(i, e) {\n",
       "        $(this).css('width', $('.df-table-wrapper-2523b2f1 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "      });\n",
       "\n",
       "    tableContainer.scroll(function() {\n",
       "      fixedHeader.css({ left: table.position().left });\n",
       "    });\n",
       "\n",
       "    $('.df-table-search', tableWrapper).keyup(function() {\n",
       "      var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "      var reg = RegExp(val, 'i');\n",
       "      var index = 0;\n",
       "      \n",
       "      rows.each(function(i, e) {\n",
       "        if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "          $(this).attr('class', 'hidden');\n",
       "        }\n",
       "        else {\n",
       "          $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "        }\n",
       "      });\n",
       "\n",
       "      $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total);\n",
       "    });\n",
       "  });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(d2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "You can also download data from a CSV file into a DataFrame which you can use with the display() API:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainer90abe27d\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistie90abe27d\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobName90abe27d\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgress90abe27d\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_container90abe27d\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitors90abe27d\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContent90abe27d\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistie90abe27d\").click(function(){\n",
       "    visible = $(\"#pm_container90abe27d\").is(':visible');\n",
       "    $(\"#pm_container90abe27d\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading 'https://openobjectstore.mybluemix.net/misc/milliondollarhomes.csv' from https://openobjectstore.mybluemix.net/misc/milliondollarhomes.csv\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>\n",
       "                    <span id=\"pm_labeladc2e21c\">Starting download...</span>\n",
       "                    <progress id=\"pm_progressadc2e21c\" max=\"100\" value=\"0\" style=\"width:200px\"></progress>\n",
       "                </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 8192 of 8192 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 16384 of 16384 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 24576 of 24576 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 32768 of 32768 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 40960 of 40960 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 49152 of 49152 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 57344 of 57344 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 65536 of 65536 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 73728 of 73728 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 81920 of 81920 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 90112 of 90112 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 98304 of 98304 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "                    $(\"#pm_labeladc2e21c\").text(\"Downloaded 102051 of 102051 bytes\");\n",
       "                    $(\"#pm_progressadc2e21c\").attr(\"value\", 100.0);\n",
       "                "
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Creating pySpark DataFrame for 'https://openobjectstore.mybluemix.net/misc/milliondollarhomes.csv'. Please wait...\n"
     ]
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "\n",
       "$(\"#pm_container90abe27d\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 8 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainer90abe27d\").show();\n",
       "$(\"#pm_overallJobName90abe27d\").text(jobName);\n",
       "$(\"#pm_overallProgress90abe27d\").attr(\"max\", 1).attr(\"value\",0);\n",
       "$(\"#progressMonitors90abe27d\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menu90abe27d8\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContent90abe27d\").append(\n",
       "'<div id=\"menu90abe27d8\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 13 <span id=\"progressNumTask90abe27d13\">0</span>/1:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progress90abe27d13\" max=\"1\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"host90abe27d13\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"status90abe27d13\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menu90abe27d8\"]').tab('show');\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Successfully created pySpark DataFrame for 'https://openobjectstore.mybluemix.net/misc/milliondollarhomes.csv'\n"
     ]
    },
    {
     "data": {
      "application/javascript": [
       "$(\"#status90abe27d13\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 1);\n",
       "}\n",
       "incProgress(\"#progress90abe27d13\");\n",
       "incProgress(\"#pm_overallProgress90abe27d\");\n",
       "$(\"#progressNumTask90abe27d13\").text(\"1\");\n",
       "$(\"#status90abe27d13\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#host90abe27d13\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#status90abe27d13\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menu90abe27d8 [id^=status90abe27d]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgress90abe27d\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n",
       "\n",
       "\n",
       "$(\"#pm_container90abe27d\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 9 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainer90abe27d\").show();\n",
       "$(\"#pm_overallJobName90abe27d\").text(jobName);\n",
       "$(\"#pm_overallProgress90abe27d\").attr(\"max\", 1).attr(\"value\",0);\n",
       "$(\"#progressMonitors90abe27d\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menu90abe27d9\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContent90abe27d\").append(\n",
       "'<div id=\"menu90abe27d9\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 14 <span id=\"progressNumTask90abe27d14\">0</span>/1:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progress90abe27d14\" max=\"1\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"host90abe27d14\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"status90abe27d14\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menu90abe27d9\"]').tab('show');\n",
       "$(\"#status90abe27d14\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 1);\n",
       "}\n",
       "incProgress(\"#progress90abe27d14\");\n",
       "incProgress(\"#pm_overallProgress90abe27d\");\n",
       "$(\"#progressNumTask90abe27d14\").text(\"1\");\n",
       "$(\"#status90abe27d14\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#host90abe27d14\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#status90abe27d14\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menu90abe27d9 [id^=status90abe27d]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgress90abe27d\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n",
       "\n",
       "\n",
       "$(\"#pm_container90abe27d\").css(\"border\",\"1px solid #dddddd\").css(\"padding\",\"10px\")\n",
       "var jobName = 'Job 10 (1 '+\n",
       "             'Stage'+  ')'\n",
       "$(\"#pm_overallContainer90abe27d\").show();\n",
       "$(\"#pm_overallJobName90abe27d\").text(jobName);\n",
       "$(\"#pm_overallProgress90abe27d\").attr(\"max\", 2).attr(\"value\",0);\n",
       "$(\"#progressMonitors90abe27d\").append(\n",
       "    '<li>'+\n",
       "        '<a style=\"padding: 5px 5px;font-size: 12px;\" data-toggle=\"tab\" href=\"#menu90abe27d10\">'+\n",
       "            jobName +\n",
       "        '</a>'+\n",
       "    '</li>'\n",
       ");\n",
       "\n",
       "$(\"#tabContent90abe27d\").append(\n",
       "'<div id=\"menu90abe27d10\" class=\"tab-pane fade in active\">'+\n",
       "    '<table>' + \n",
       "        '<thead>' +\n",
       "            '<tr>' +\n",
       "                '<th style=\"text-align:center\">Stage</th>' +\n",
       "                '<th style=\"text-align:center\">Progress</th>' +\n",
       "                '<th style=\"text-align:center\">Executor</th>' +\n",
       "                '<th style=\"text-align:center\">Details</th>' +\n",
       "            '</tr>' +\n",
       "        '</thead>' +\n",
       "        '<tbody>' + \n",
       "        \n",
       "            '<tr>        <td style=\"max-width:200px\">            Stage 15 <span id=\"progressNumTask90abe27d15\">0</span>/2:        </td>        <td style=\"max-width: 300px\">            <progress id=\"progress90abe27d15\" max=\"2\" value=\"0\" style=\"width:200px\"></progress>        </td>        <td>            <span id=\"host90abe27d15\"></span>        </td>        <td>            <i title=\"org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:132)\\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\njava.lang.reflect.Method.invoke(Method.java:498)\\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)\\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\\npy4j.Gateway.invoke(Gateway.java:280)\\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\\npy4j.commands.CallCommand.execute(CallCommand.java:79)\\npy4j.GatewayConnection.run(GatewayConnection.java:214)\\njava.lang.Thread.run(Thread.java:748)\" class=\"fa fa-info-circle\"></i>            <span id=\"status90abe27d15\">Not Started</span>        </td>    </tr>'+\n",
       "        \n",
       "        '</tbody>' +\n",
       "    '</table>' +\n",
       "'</div>'\n",
       ")\n",
       "\n",
       "$('.nav-tabs a[href=\"#menu90abe27d10\"]').tab('show');\n",
       "$(\"#status90abe27d15\").text(\"Submitted\")\n",
       "\n",
       "\n",
       "function incProgress(id){\n",
       "    var n = $(id);\n",
       "    n.attr(\"value\", parseInt( n.attr(\"value\")) + 2);\n",
       "}\n",
       "incProgress(\"#progress90abe27d15\");\n",
       "incProgress(\"#pm_overallProgress90abe27d\");\n",
       "$(\"#progressNumTask90abe27d15\").text(\"2\");\n",
       "$(\"#status90abe27d15\").text(\"Running\")\n",
       "\n",
       "\n",
       "$(\"#host90abe27d15\").text(\"driver(localhost)\")\n",
       "\n",
       "$(\"#status90abe27d15\").text(\"Completed\")\n",
       "\n",
       "\n",
       "$(\"#menu90abe27d10 [id^=status90abe27d]\").each(function(){\n",
       "    if ($(this).text() == \"Not Started\"){\n",
       "        $(this).text(\"Skipped\");\n",
       "    }\n",
       "})\n",
       "\n",
       "var n = $(\"#pm_overallProgress90abe27d\");\n",
       "n.attr(\"value\", parseInt(n.attr(\"max\")))\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "d3 = pixiedust.sampleData(\"https://openobjectstore.mybluemix.net/misc/milliondollarhomes.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# PixieDust Log"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainer06cb9160\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistie06cb9160\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobName06cb9160\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgress06cb9160\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_container06cb9160\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitors06cb9160\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContent06cb9160\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistie06cb9160\").click(function(){\n",
       "    visible = $(\"#pm_container06cb9160\").is(':visible');\n",
       "    $(\"#pm_container06cb9160\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2017-06-02 10:27:21,882 - pixiedust.utils.storage - INFO - Change in version detected: 1.0.4 -> 1.0.5.\n",
      "2017-06-02 10:27:28,995 - pixiedust.utils.scalaBridge.PixiedustScalaMagics - DEBUG - Calling scala compiler with command: /Users/mbrobergus.ibm.com/pixiedust/bin/scala/scala-2.11.8/bin/scalac -classpath /Users/mbrobergus.ibm.com/pixiedust/data/libs/graphframes-0.1.0-spark1.6.jar:/Users/mbrobergus.ibm.com/pixiedust/data/libs/pixiedust.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/conf/:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/activation-1.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr-2.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr-runtime-3.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr4-runtime-4.5.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/aopalliance-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/aopalliance-repackaged-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apache-log4j-extras-1.2.17.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apacheds-i18n-2.0.0-M15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/api-asn1-api-1.0.0-M20.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/api-util-1.0.0-M20.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/arpack_combined_all-0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-1.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-ipc-1.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-mapred-1.7.7-hadoop2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/base64-2.3.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/bcprov-jdk15on-1.51.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/bonecp-0.8.0.RELEASE.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/breeze-macros_2.11-0.11.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/breeze_2.11-0.11.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-avatica-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-core-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-linq4j-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/chill-java-0.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/chill_2.11-0.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-beanutils-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-beanutils-core-1.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-cli-1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-codec-1.10.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-collections-3.2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-compiler-2.7.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-compress-1.4.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-configuration-1.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-dbcp-1.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-digester-1.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-httpclient-3.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-io-2.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-lang-2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-lang3-3.3.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-logging-1.1.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-math3-3.4.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-net-2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-pool-1.5.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/compress-lzf-1.0.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/core-1.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-client-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-framework-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-recipes-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-api-jdo-3.2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-core-3.2.10.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-rdbms-3.2.9.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/derby-10.12.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/eigenbase-properties-1.1.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/gson-2.2.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guava-14.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guice-3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guice-servlet-3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-annotations-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-auth-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-client-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-hdfs-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-app-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-core-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-jobclient-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-shuffle-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-api-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-client-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-server-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-server-web-proxy-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-beeline-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-cli-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-exec-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-jdbc-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-metastore-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-api-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-locator-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-utils-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/htrace-core-3.1.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/httpclient-4.5.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/httpcore-4.4.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/ivy-2.4.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-annotations-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-core-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-core-asl-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-databind-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-jaxrs-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-mapper-asl-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-module-paranamer-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-module-scala_2.11-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-xc-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/janino-2.7.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/java-xmlbuilder-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/JavaEWAH-0.3.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javassist-3.18.1-GA.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.annotation-api-1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.inject-1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.inject-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.servlet-api-3.1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.ws.rs-api-2.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javolution-5.5.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jaxb-api-2.2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jcl-over-slf4j-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jdo-api-3.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-client-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-common-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-container-servlet-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-container-servlet-core-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-guava-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-media-jaxb-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-server-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jets3t-0.9.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jetty-6.1.26.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jetty-util-6.1.26.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jline-2.12.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/joda-time-2.9.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jodd-core-3.5.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jpam-1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json-20090211.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-ast_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-core_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-jackson_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jsp-api-2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jsr305-1.3.9.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jta-1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jtransforms-2.4.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jul-to-slf4j-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/kryo-shaded-3.0.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/leveldbjni-all-1.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/libfb303-0.9.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/libthrift-0.9.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/log4j-1.2.17.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/lz4-1.3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mail-1.4.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mesos-0.21.1-shaded-protobuf.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-core-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-graphite-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-json-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-jvm-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/minlog-1.3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mx4j-3.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/netty-3.8.0.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/netty-all-4.0.29.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/objenesis-2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/opencsv-2.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/oro-2.0.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/osgi-resource-locator-1.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/paranamer-2.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-column-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-common-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-encoding-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-format-2.3.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-generator-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-hadoop-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-hadoop-bundle-1.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-jackson-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pmml-model-1.2.15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pmml-schema-1.2.15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/protobuf-java-2.5.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/py4j-0.10.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pyrolite-4.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/RoaringBitmap-0.5.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-compiler-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-library-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-parser-combinators_2.11-1.0.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-reflect-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-xml_2.11-1.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scalap-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/slf4j-api-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/slf4j-log4j12-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/snappy-0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/snappy-java-1.1.2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-catalyst_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-core_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-graphx_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-hive-thriftserver_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-hive_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-launcher_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-mllib-local_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-mllib_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-network-common_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-network-shuffle_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-repl_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-sketch_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-sql_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-streaming_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-tags_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-unsafe_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-yarn_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spire-macros_2.11-0.7.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spire_2.11-0.7.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/ST4-4.0.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stax-api-1.0-2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stax-api-1.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stream-2.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stringtemplate-3.2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/super-csv-2.2.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/univocity-parsers-2.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/validation-api-1.1.0.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xbean-asm5-shaded-4.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xercesImpl-2.9.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xmlenc-0.52.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xz-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/zookeeper-3.4.6.jar pixiedustRunner.scala\n",
      "2017-06-02 10:27:32,661 - pixiedust.utils.javaBridge - DEBUG - Calling callMethod: methodName: init\n",
      "2017-06-02 10:27:32,666 - pixiedust.utils.javaBridge - DEBUG - Found method with Name init\n",
      "2017-06-02 10:27:32,669 - pixiedust.utils.javaBridge - DEBUG - Calling callMethod: methodName: runCell\n",
      "2017-06-02 10:27:32,672 - pixiedust.utils.javaBridge - DEBUG - Found method with Name runCell\n",
      "2017-06-02 10:27:48,663 - pixiedust.display - DEBUG - Creating a new display handler with options {}: <pixiedust.display.display.CellHandshakeMeta object at 0x117444250>\n",
      "2017-06-02 10:27:48,760 - pixiedust.display.display.Display - DEBUG - pixiedust code: if (typeof pixiedust == \"undefined\"){\n",
      "    var s=document.getElementsByTagName('script')[0];\n",
      "    var g=document.createElement( 'script'  );\n",
      "    g.type= 'text/javascript';\n",
      "    g.defer=false; \n",
      "    g.async=false;\n",
      "    var code = \"var pixiedust = (function(){\\n\"+\n",
      "\"    return {\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        executeDisplay:function(pd_controls, user_controls){\\n\"+\n",
      "\"            pd_controls = pd_controls || {};\\n\"+\n",
      "\"            user_controls = user_controls || {\\\"options\\\":{}};\\n\"+\n",
      "\"            var options = $.extend({}, pd_controls.options || {}, user_controls.options || {} );\\n\"+\n",
      "\"            function onDisplayDone(){\\n\"+\n",
      "\"                if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                    user_controls.onDisplayDone();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            var pd_prefix = pd_controls.prefix;\\n\"+\n",
      "\"            var $targetDivId = user_controls.targetDivId;\\n\"+\n",
      "\"            !function() {\\n\"+\n",
      "\"    function getTargetNode(){\\n\"+\n",
      "\"        return $('#' + ($targetDivId || (\\\"wrapperHTML\\\"+ pd_prefix)));\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    var cellId = options.cell_id || \\\"\\\";\\n\"+\n",
      "\"    var curCell=IPython.notebook.get_cells().filter(function(cell){\\n\"+\n",
      "\"        return cell.cell_id==cellId;\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    curCell=curCell.length>0?curCell[0]:null;\\n\"+\n",
      "\"    console.log(\\\"curCell\\\",curCell);\\n\"+\n",
      "\"    var startWallToWall;\\n\"+\n",
      "\"        var callbacks = {\\n\"+\n",
      "\"        shell : {\\n\"+\n",
      "\"            reply : function(){\\n\"+\n",
      "\"                if ( !callbacks.response ){\\n\"+\n",
      "\"                    getTargetNode().html(\\\"\\\")\\n\"+\n",
      "\"                    if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                        user_controls.onDisplayDone();\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            },\\n\"+\n",
      "\"            payload : {\\n\"+\n",
      "\"                set_next_input : function(payload){\\n\"+\n",
      "\"                    if (curCell){\\n\"+\n",
      "\"                        curCell._handle_set_next_input(payload);\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        },\\n\"+\n",
      "\"        iopub:{\\n\"+\n",
      "\"            output:function(msg){\\n\"+\n",
      "\"                callbacks.response = true;\\n\"+\n",
      "\"                console.log(\\\"msg\\\", msg);\\n\"+\n",
      "\"                if (cellId == \\\"\\\"){\\n\"+\n",
      "\"                    if (curCell){\\n\"+\n",
      "\"                        curCell.output_area.handle_output.apply(curCell.output_area, arguments);\\n\"+\n",
      "\"                        curCell.output_area.outputs=[];\\n\"+\n",
      "\"                    }else{\\n\"+\n",
      "\"                        console.log(\\\"Could not find current cell\\\");\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    return;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                var msg_type=msg.header.msg_type;\\n\"+\n",
      "\"                var content = msg.content;\\n\"+\n",
      "\"                if(msg_type===\\\"stream\\\"){\\n\"+\n",
      "\"                    if (user_controls.onSuccess){\\n\"+\n",
      "\"                        user_controls.onSuccess(content.text);\\n\"+\n",
      "\"                    }else{\\n\"+\n",
      "\"                        getTargetNode().html(content.text);\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }else if (msg_type===\\\"display_data\\\" || msg_type===\\\"execute_result\\\"){\\n\"+\n",
      "\"                    var html=null;\\n\"+\n",
      "\"                    if (!!content.data[\\\"text/html\\\"]){\\n\"+\n",
      "\"                        html=content.data[\\\"text/html\\\"];\\n\"+\n",
      "\"                    }else if (!!content.data[\\\"image/png\\\"]){\\n\"+\n",
      "\"                        html=html||\\\"\\\";\\n\"+\n",
      "\"                        html+=\\\"<img src='data:image/png;base64,\\\" +content.data[\\\"image/png\\\"]+\\\"'></img>\\\";\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                                                    \\n\"+\n",
      "\"                    if (!!content.data[\\\"application/javascript\\\"]){\\n\"+\n",
      "\"                        try {\\n\"+\n",
      "\"                            eval(content.data[\\\"application/javascript\\\"]);\\n\"+\n",
      "\"                        } catch(err) {\\n\"+\n",
      "\"                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\\n\"+\n",
      "\"                        }                        \\n\"+\n",
      "\"                        return;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    \\n\"+\n",
      "\"                    if (html){\\n\"+\n",
      "\"                        try{\\n\"+\n",
      "\"                            if (user_controls.onSuccess){\\n\"+\n",
      "\"                                user_controls.onSuccess(html);\\n\"+\n",
      "\"                            }else{\\n\"+\n",
      "\"                                getTargetNode().html(html);\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }catch(e){\\n\"+\n",
      "\"                            console.log(\\\"Invalid html output\\\", e, html);\\n\"+\n",
      "\"                            getTargetNode().html( \\\"Invalid html output: \\\" + e.message + \\\"<pre>\\\" \\n\"+\n",
      "\"                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\\\"/g,'&quot;') + \\\"<pre>\\\");\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"\\n\"+\n",
      "\"                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\\n\"+\n",
      "\"                            setTimeout(function(){\\n\"+\n",
      "\"                                var data = JSON.parse(JSON.stringify(content.data));\\n\"+\n",
      "\"                                if(!!data[\\\"text/html\\\"])data[\\\"text/html\\\"]=html;\\n\"+\n",
      "\"                                function savedData(data){\\n\"+\n",
      "\"                                    \\n\"+\n",
      "\"                                    var markup='<style type=\\\"text/css\\\">.pd_warning{display:none;}</style>';\\n\"+\n",
      "\"                                    markup+='<div class=\\\"pd_warning\\\"><em>Hey, there\\\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\\n\"+\n",
      "\"                                    nodes = $.parseHTML(data[\\\"text/html\\\"], null, true);\\n\"+\n",
      "\"                                    var s = $(nodes).wrap(\\\"<div>\\\").parent().find(\\\".pd_save\\\").not(\\\".pd_save .pd_save\\\")\\n\"+\n",
      "\"                                    s.each(function(){\\n\"+\n",
      "\"                                        var found = false;\\n\"+\n",
      "\"                                        if ( $(this).attr(\\\"id\\\") ){\\n\"+\n",
      "\"                                            var n = $(\\\"#\\\" + $(this).attr(\\\"id\\\"));\\n\"+\n",
      "\"                                            if (n.length>0){\\n\"+\n",
      "\"                                                found=true;\\n\"+\n",
      "\"                                                n.each(function(){\\n\"+\n",
      "\"                                                    $(this).addClass(\\\"is-viewer-good\\\");\\n\"+\n",
      "\"                                                });\\n\"+\n",
      "\"                                                markup+=n.wrap(\\\"<div>\\\").parent().html();\\n\"+\n",
      "\"                                            }\\n\"+\n",
      "\"                                        }else{\\n\"+\n",
      "\"                                            $(this).addClass(\\\"is-viewer-good\\\");\\n\"+\n",
      "\"                                        }\\n\"+\n",
      "\"                                        if (!found){\\n\"+\n",
      "\"                                            markup+=$(this).parent().html();\\n\"+\n",
      "\"                                        }\\n\"+\n",
      "\"                                    });\\n\"+\n",
      "\"                                    data[\\\"text/html\\\"] = markup;\\n\"+\n",
      "\"                                    return data;\\n\"+\n",
      "\"                                }\\n\"+\n",
      "\"                                curCell.output_area.outputs.push({\\\"data\\\": savedData(data),\\\"metadata\\\":content.metadata,\\\"output_type\\\":msg_type});\\n\"+\n",
      "\"                            },2000);\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }else if (msg_type === \\\"error\\\") {\\n\"+\n",
      "\"                    require(['base/js/utils'], function(utils) {\\n\"+\n",
      "\"                        var tb = content.traceback;\\n\"+\n",
      "\"                        console.log(\\\"tb\\\",tb);\\n\"+\n",
      "\"                        if (tb && tb.length>0){\\n\"+\n",
      "\"                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\\\\\n';},\\\"\\\");\\n\"+\n",
      "\"                            console.log(\\\"data\\\",data);\\n\"+\n",
      "\"                            data = utils.fixConsole(data);\\n\"+\n",
      "\"                            data = utils.fixCarriageReturn(data);\\n\"+\n",
      "\"                            data = utils.autoLinkUrls(data);\\n\"+\n",
      "\"                            if (user_controls.onError){\\n\"+\n",
      "\"                                user_controls.onError(data);\\n\"+\n",
      "\"                            }else{\\n\"+\n",
      "\"                                getTargetNode().html(\\\"<pre>\\\" + data +\\\"</pre>\\\");\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    });\\n\"+\n",
      "\"                }else{\\n\"+\n",
      "\"                    callbacks.response = false;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                    user_controls.onDisplayDone();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\\n\"+\n",
      "\"        var command = user_controls.script || pd_controls.command.replace(\\\"cellId\\\",cellId);\\n\"+\n",
      "\"        if ( !user_controls.script){\\n\"+\n",
      "\"            function addOptions(options, override=true){\\n\"+\n",
      "\"                function getStringRep(v) {\\n\"+\n",
      "\"                    return \\\"'\\\" + v + \\\"'\\\";\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                for (var key in (options||{})){\\n\"+\n",
      "\"                    var value = options[key];\\n\"+\n",
      "\"                    var hasValue = value != null && typeof value !== 'undefined' && value !== '';\\n\"+\n",
      "\"                    var replaceValue = hasValue ? (key+\\\"=\\\" + getStringRep(value) ) : \\\"\\\";\\n\"+\n",
      "\"                    var pattern = (hasValue?\\\"\\\":\\\",\\\")+\\\"\\\\\\\\s*\\\" + key + \\\"\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"                    var rpattern=new RegExp(pattern);\\n\"+\n",
      "\"                    var n = command.search(rpattern);\\n\"+\n",
      "\"                    if ( n >= 0 ){\\n\"+\n",
      "\"                        if (override){\\n\"+\n",
      "\"                            command = command.replace(rpattern, replaceValue);\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }else if (hasValue){\\n\"+\n",
      "\"                        var n = command.lastIndexOf(\\\")\\\");\\n\"+\n",
      "\"                        command = [command.slice(0, n), (command[n-1]==\\\"(\\\"? \\\"\\\":\\\",\\\") + replaceValue, command.slice(n)].join('')\\n\"+\n",
      "\"                    }        \\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            if(typeof cellMetadata != \\\"undefined\\\" && cellMetadata.displayParams){\\n\"+\n",
      "\"                addOptions(cellMetadata.displayParams);\\n\"+\n",
      "\"                addOptions({\\\"showchrome\\\":\\\"true\\\"});\\n\"+\n",
      "\"            }else if (curCell && curCell._metadata.pixiedust ){\\n\"+\n",
      "\"                addOptions(curCell._metadata.pixiedust.displayParams || {}, pd_controls.useCellMetadata);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            addOptions(user_controls.options||{});\\n\"+\n",
      "\"            var pattern = \\\"\\\\\\\\w*\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"            var rpattern=new RegExp(pattern,\\\"g\\\");\\n\"+\n",
      "\"            var n = command.match(rpattern);\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            var org_params = {}\\n\"+\n",
      "\"            for (var i=0; i<n.length;i++){\\n\"+\n",
      "\"                var parts = n[i].split(\\\"=\\\")\\n\"+\n",
      "\"                if (parts[0].trim() == \\\"org_params\\\"){\\n\"+\n",
      "\"                    var value = parts[1].trim()\\n\"+\n",
      "\"                    var values = value.substring(1,value.length-1).split(\\\",\\\");\\n\"+\n",
      "\"                    for (var p in values){\\n\"+\n",
      "\"                        org_params[values[p].trim()] = true;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    break;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            var displayParams={}\\n\"+\n",
      "\"            for (var i = 0; i < n.length; i++){\\n\"+\n",
      "\"                var parts=n[i].split(\\\"=\\\");\\n\"+\n",
      "\"                var key = parts[0].trim();\\n\"+\n",
      "\"                var value = parts[1].trim()\\n\"+\n",
      "\"                if (!key.startsWith(\\\"nostore_\\\") && key != \\\"showchrome\\\" && key != \\\"prefix\\\" && key != \\\"cell_id\\\" && key != \\\"org_params\\\" && !!!org_params[key]){\\n\"+\n",
      "\"                    displayParams[key] = value.substring(1,value.length-1);\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"\\n\"+\n",
      "\"            \\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if(curCell&&curCell.output_area){\\n\"+\n",
      "\"            if ( !user_controls.nostoreMedatadata ){\\n\"+\n",
      "\"                curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\\n\"+\n",
      "\"                curCell._metadata.pixiedust.displayParams=displayParams\\n\"+\n",
      "\"                curCell.output_area.outputs=[];\\n\"+\n",
      "\"                var old_msg_id = curCell.last_msg_id;\\n\"+\n",
      "\"                if (old_msg_id) {\\n\"+\n",
      "\"                    curCell.kernel.clear_callbacks_for_msg(old_msg_id);\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            console.log(\\\"couldn't find the cell\\\");\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        $('#wrapperJS' + pd_prefix).html(\\\"\\\")\\n\"+\n",
      "\"        if (!getTargetNode().hasClass( \\\"no_loading_msg\\\" )){\\n\"+\n",
      "\"            getTargetNode().html(\\n\"+\n",
      "\"                '<div style=\\\"width:100px;height:60px;left:47%;position:relative\\\">'+\\n\"+\n",
      "\"                    '<i class=\\\"fa fa-circle-o-notch fa-spin\\\" style=\\\"font-size:48px\\\"></i>'+\\n\"+\n",
      "\"                '</div>'+\\n\"+\n",
      "\"                '<div style=\\\"text-align:center\\\">' +\\n\"+\n",
      "\"                    (getTargetNode().attr(\\\"pd_loading_msg\\\") || \\\"Loading your data. Please wait...\\\") +\\n\"+\n",
      "\"                '</div>'\\n\"+\n",
      "\"            );\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        console.log(\\\"Running command2\\\",command);\\n\"+\n",
      "\"        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"}()\\n\"+\n",
      "\"        },\\n\"+\n",
      "\"        executeInDialog:function(pd_controls, user_controls){\\n\"+\n",
      "\"            pd_controls = pd_controls || {};\\n\"+\n",
      "\"            user_controls = user_controls || {\\\"options\\\":{}};\\n\"+\n",
      "\"            var displayOptions = $.extend({}, pd_controls.options || {}, user_controls.options || {} );\\n\"+\n",
      "\"            var global={};\\n\"+\n",
      "\"            require(['base/js/dialog'],function(dialog){\\n\"+\n",
      "\"                var modal = dialog.modal;\\n\"+\n",
      "\"                var attr_pd_ctrl = JSON.stringify(pd_controls).trim()\\n\"+\n",
      "\"                    .replace(/&/g, '&amp;')\\n\"+\n",
      "\"                    .replace(/'/g, '&apos;')\\n\"+\n",
      "\"                    .replace(/\\\"/g, '&quot;')\\n\"+\n",
      "\"                    .replace(/</g, '&lt;')\\n\"+\n",
      "\"                    .replace(/>/g, '&gt;');\\n\"+\n",
      "\"                var dialogRoot = \\\"dialog\\\" + pd_controls.prefix + \\\"root\\\";\\n\"+\n",
      "\"                var options = {\\n\"+\n",
      "\"                    title: \\\"Pixiedust: \\\" + (displayOptions.title || \\\"Dialog\\\"),\\n\"+\n",
      "\"                    body: '<div id=\\\"' + dialogRoot + '\\\" pixiedust=\\\"' + attr_pd_ctrl + '\\\" class=\\\"pixiedust\\\"></div>',\\n\"+\n",
      "\"                    sanitize:false,\\n\"+\n",
      "\"                    notebook: IPython.notebook,\\n\"+\n",
      "\"                    keyboard_manager: IPython.notebook.keyboard_manager,\\n\"+\n",
      "\"                    maximize_modal: (displayOptions.maximize === \\\"true\\\"),\\n\"+\n",
      "\"                    buttons: {\\n\"+\n",
      "\"                        OK: {\\n\"+\n",
      "\"                            class : \\\"btn-primary btn-ok\\\",\\n\"+\n",
      "\"                            click: function() {\\n\"+\n",
      "\"                                var dlg = $(\\\"#\\\" + dialogRoot + \\\" > pd_dialog\\\");\\n\"+\n",
      "\"                                try{\\n\"+\n",
      "\"                                    return new Function('global', 'modal_obj', dlg.find(\\\"> pd_ok\\\").text().trim())(global, modal_obj);\\n\"+\n",
      "\"                                }catch(e){\\n\"+\n",
      "\"                                    console.error(e);\\n\"+\n",
      "\"                                    return false;\\n\"+\n",
      "\"                                }\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        },\\n\"+\n",
      "\"                        Cancel: {\\n\"+\n",
      "\"                            class : \\\"btn-cancel\\\",\\n\"+\n",
      "\"                            click: function(){\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                function resizeDialog() {\\n\"+\n",
      "\"                    global.modalBodyStyle = $('.pixiedust .modal-body').attr('style');\\n\"+\n",
      "\"                    global.modalFooterStyle = $('.pixiedust .modal-footer').attr('style');\\n\"+\n",
      "\"                    $('.pixiedust .modal-body').attr('style', global.modalBodyStyle ? global.modalBodyStyle + ';padding:5px 20px !important;' : 'padding:5px 20px !important;');\\n\"+\n",
      "\"                    $('.pixiedust .modal-footer').attr('style', 'display:none !important;');\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                function resetDialog() {\\n\"+\n",
      "\"                    if (global.modalBodyStyle) {\\n\"+\n",
      "\"                        $('.pixiedust .modal-body').attr('style', global.modalBodyStyle);\\n\"+\n",
      "\"                    } else {\\n\"+\n",
      "\"                        $('.pixiedust .modal-body').removeAttr('style');\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    if (global.modalFooterStyle) {\\n\"+\n",
      "\"                        $('.pixiedust .modal-footer').attr('style', global.modalFooterStyle);\\n\"+\n",
      "\"                    } else {\\n\"+\n",
      "\"                        $('.pixiedust .modal-footer').removeAttr('style');\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                var modal_obj = modal(options);\\n\"+\n",
      "\"                modal_obj.addClass('pixiedust pixiedust-app');\\n\"+\n",
      "\"                if (options.maximize_modal) {\\n\"+\n",
      "\"                    modal_obj.addClass('pixiedust pixiedust-app pixiedust-maximize');\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                modal_obj.on('shown.bs.modal', function(){\\n\"+\n",
      "\"                    resizeDialog();\\n\"+\n",
      "\"                    var isFF = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\\n\"+\n",
      "\"                    if( isFF && options.keyboard_manager){\\n\"+\n",
      "\"                        \\n\"+\n",
      "\"                        var KeyboardManager = require('notebook/js/keyboardmanager').KeyboardManager;\\n\"+\n",
      "\"                        global.KMEnableProto = KeyboardManager.prototype.enable;\\n\"+\n",
      "\"                        KeyboardManager.prototype.enable = function () {\\n\"+\n",
      "\"                            this.enabled = false;\\n\"+\n",
      "\"                        };\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    IPython.keyboard_manager.register_events(modal_obj);\\n\"+\n",
      "\"                    user_controls.options.targetDivId = user_controls.targetDivId = dialogRoot;\\n\"+\n",
      "\"                    if ( user_controls.options.dialog == 'true'){\\n\"+\n",
      "\"                        user_controls.onDisplayDone = function(){\\n\"+\n",
      "\"                            var dlg = $(\\\"#\\\" + dialogRoot + \\\" > pd_dialog\\\")\\n\"+\n",
      "\"                            try{\\n\"+\n",
      "\"                                new Function('global', 'modal_obj', dlg.find(\\\"> pd_onload\\\").text().trim())(global, modal_obj);\\n\"+\n",
      "\"                            }catch(e){\\n\"+\n",
      "\"                                console.error(e);\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    pixiedust.dialogRoot = dialogRoot;\\n\"+\n",
      "\"                    pixiedust.executeDisplay(pd_controls, user_controls);\\n\"+\n",
      "\"                });\\n\"+\n",
      "\"                modal_obj.on(\\\"hidden.bs.modal\\\", function () {\\n\"+\n",
      "\"                    resetDialog();\\n\"+\n",
      "\"                    if ( global.KMEnableProto ){\\n\"+\n",
      "\"                        var KeyboardManager = require('notebook/js/keyboardmanager').KeyboardManager;\\n\"+\n",
      "\"                        KeyboardManager.prototype.enable = global.KMEnableProto;\\n\"+\n",
      "\"                        delete global.KMEnableProto;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    pixiedust.dialogRoot = null;\\n\"+\n",
      "\"                });\\n\"+\n",
      "\"            })\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"})();\\n\"+\n",
      "\"\\n\"+\n",
      "\"function resolveScriptMacros(script){\\n\"+\n",
      "\"    script = script && script.replace(/\\\\$val\\\\(\\\\\\\"?(\\\\w*)\\\\\\\"?\\\\)/g, function(a,b){\\n\"+\n",
      "\"        var v = $(\\\"#\\\" + b ).val();\\n\"+\n",
      "\"        if (!v && window[b] && typeof window[b] === \\\"function\\\"){\\n\"+\n",
      "\"            v = window[b]();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if (!v && pixiedust[b] && typeof pixiedust[b] === \\\"function\\\"){\\n\"+\n",
      "\"            v = pixiedust[b]();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if (!v){\\n\"+\n",
      "\"            console.log(\\\"Warning: Unable to resolve value for element \\\", b);\\n\"+\n",
      "\"            return a;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        return v.split('\\\"').join('&quot;').split('\\\\n').join('\\\\\\\\n');\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    return script;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function getParentScript(element){\\n\"+\n",
      "\"    var scripts = [];\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $(element).parents(\\\"[pd_script]\\\").each(function(){\\n\"+\n",
      "\"        scripts.unshift(this.getAttribute(\\\"pd_script\\\"));\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    var script = \\\"\\\";\\n\"+\n",
      "\"    $.each( scripts, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            script += \\\"\\\\n\\\" + value;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    return script;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function preRun(element){\\n\"+\n",
      "\"    var preRunCode = null;\\n\"+\n",
      "\"    $(element).find(\\\"> pd_script\\\").each(function(){\\n\"+\n",
      "\"        var type = this.getAttribute(\\\"type\\\");\\n\"+\n",
      "\"        if (type==\\\"preRun\\\"){\\n\"+\n",
      "\"            preRunCode = $(this).text();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    if (!preRunCode ){\\n\"+\n",
      "\"        return true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return new Function(preRunCode.trim())();\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function addOptions(command, options, override=true){\\n\"+\n",
      "\"    function getStringRep(v) {\\n\"+\n",
      "\"        return \\\"'\\\" + v + \\\"'\\\";\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    for (var key in (options||{})){\\n\"+\n",
      "\"        var value = options[key];\\n\"+\n",
      "\"        var hasValue = value != null && typeof value !== 'undefined' && value !== '';\\n\"+\n",
      "\"        var replaceValue = hasValue ? (key+\\\"=\\\" + getStringRep(value) ) : \\\"\\\";\\n\"+\n",
      "\"        var pattern = (hasValue?\\\"\\\":\\\",\\\")+\\\"\\\\\\\\s*\\\" + key + \\\"\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"        var rpattern=new RegExp(pattern);\\n\"+\n",
      "\"        var n = command.search(rpattern);\\n\"+\n",
      "\"        if ( n >= 0 ){\\n\"+\n",
      "\"            if (override){\\n\"+\n",
      "\"                command = command.replace(rpattern, replaceValue);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else if (hasValue){\\n\"+\n",
      "\"            var n = command.lastIndexOf(\\\")\\\");\\n\"+\n",
      "\"            command = [command.slice(0, n), (command[n-1]==\\\"(\\\"? \\\"\\\":\\\",\\\") + replaceValue, command.slice(n)].join('')\\n\"+\n",
      "\"        }        \\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return command;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function readExecInfo(pd_controls, element){\\n\"+\n",
      "\"    var execInfo = {}\\n\"+\n",
      "\"    execInfo.options = {}\\n\"+\n",
      "\"    var hasOptions = false;\\n\"+\n",
      "\"    $.each( element.attributes, function(){\\n\"+\n",
      "\"        if (this.name.startsWith(\\\"option_\\\")){\\n\"+\n",
      "\"            hasOptions = true;\\n\"+\n",
      "\"            execInfo.options[this.name.replace(\\\"option_\\\", \\\"\\\")] = this.value || null;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    var pd_options = resolveScriptMacros(element.getAttribute(\\\"pd_options\\\"));\\n\"+\n",
      "\"    if (pd_options){\\n\"+\n",
      "\"        var parts = pd_options.split(\\\";\\\");\\n\"+\n",
      "\"        $.each( parts, function(){\\n\"+\n",
      "\"            var index = this.indexOf(\\\"=\\\");\\n\"+\n",
      "\"            if ( index > 1){\\n\"+\n",
      "\"                hasOptions = true;\\n\"+\n",
      "\"                execInfo.options[this.substring(0, index)] = this.substring(index+1);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    execInfo.options.nostore_figureOnly = true;\\n\"+\n",
      "\"    execInfo.options.targetDivId = execInfo.targetDivId = element.getAttribute(\\\"pd_target\\\");\\n\"+\n",
      "\"    if (execInfo.options.targetDivId){\\n\"+\n",
      "\"        execInfo.options.no_margin=true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.options.widget = element.getAttribute(\\\"pd_widget\\\");\\n\"+\n",
      "\"\\n\"+\n",
      "\"        var parentStyles = [];\\n\"+\n",
      "\"    var hiddenBlockStyle = 'visibility: hidden !important; display: block !important;';\\n\"+\n",
      "\"    var tDiv = $(\\\"#\\\" + execInfo.targetDivId);\\n\"+\n",
      "\"    var tDivParents = tDiv.parents().addBack().filter(':hidden');\\n\"+\n",
      "\"    tDivParents.each(function() {\\n\"+\n",
      "\"        var currentStyle = $(this).attr('style');\\n\"+\n",
      "\"        parentStyles.push(currentStyle);\\n\"+\n",
      "\"        $(this).attr('style', currentStyle ? currentStyle + ';' + hiddenBlockStyle : hiddenBlockStyle);\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"        w = tDiv.width()\\n\"+\n",
      "\"    if (w) {\\n\"+\n",
      "\"        execInfo.options.nostore_cw= w;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    if ($(element).parents(\\\".modal-dialog\\\").length > 0 ) {\\n\"+\n",
      "\"        h = tDiv.height()\\n\"+\n",
      "\"        if (h) {\\n\"+\n",
      "\"            execInfo.options.nostore_ch = h-10;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"        tDivParents.each(function(i) {\\n\"+\n",
      "\"        if (parentStyles[i] === undefined) {\\n\"+\n",
      "\"            $(this).removeAttr('style');\\n\"+\n",
      "\"        } else {\\n\"+\n",
      "\"            $(this).attr('style', parentStyles[i]);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.script = element.getAttribute(\\\"pd_script\\\");\\n\"+\n",
      "\"    if (!execInfo.script){\\n\"+\n",
      "\"        $(element).find(\\\"> pd_script\\\").each(function(){\\n\"+\n",
      "\"            var type = this.getAttribute(\\\"type\\\");\\n\"+\n",
      "\"            if (!type || type==\\\"python\\\"){\\n\"+\n",
      "\"                execInfo.script = $(this).text();\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        })\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.refresh = element.hasAttribute(\\\"pd_refresh\\\");\\n\"+\n",
      "\"    execInfo.norefresh = element.hasAttribute(\\\"pd_norefresh\\\");\\n\"+\n",
      "\"    execInfo.entity = element.hasAttribute(\\\"pd_entity\\\") ? element.getAttribute(\\\"pd_entity\\\") || \\\"pixieapp_entity\\\" : null;\\n\"+\n",
      "\"\\n\"+\n",
      "\"    function applyEntity(c, e, doptions){\\n\"+\n",
      "\"        if (!e){\\n\"+\n",
      "\"            return addOptions(c, doptions);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        c = c.replace(/\\\\((\\\\w*),/, \\\"($1.\\\" + e + \\\",\\\")\\n\"+\n",
      "\"        return addOptions(c, doptions);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!hasOptions && (execInfo.refresh || execInfo.options.widget) && !execInfo.script){\\n\"+\n",
      "\"        execInfo.script = \\\"#refresh\\\";\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    var dialog = (execInfo.options.dialog == \\\"true\\\");\\n\"+\n",
      "\"    if ( dialog ){\\n\"+\n",
      "\"        execInfo.script = execInfo.script || \\\"#refresh\\\";\\n\"+\n",
      "\"        execInfo.refresh = true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (execInfo.script){\\n\"+\n",
      "\"        execInfo.script = execInfo.script.trim()\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        var match = pd_controls.command.match(/display\\\\((\\\\w*),/)\\n\"+\n",
      "\"        if (match){\\n\"+\n",
      "\"            var entity = match[1]\\n\"+\n",
      "\"            console.log(\\\"Inject self with entity\\\", entity)\\n\"+\n",
      "\"            execInfo.script = \\\"from pixiedust.utils.shellAccess import ShellAccess\\\\n\\\"+\\n\"+\n",
      "\"                \\\"self=ShellAccess['\\\" + entity + \\\"']\\\\n\\\" +\\n\"+\n",
      "\"                resolveScriptMacros( getParentScript(element) ) + '\\\\n' +\\n\"+\n",
      "\"                resolveScriptMacros(execInfo.script);\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            if ( ( (!dialog && !execInfo.targetDivId) || execInfo.refresh || execInfo.entity) && !execInfo.norefresh && $(element).children(\\\"target[pd_target]\\\").length == 0){\\n\"+\n",
      "\"                \\n\"+\n",
      "\"                execInfo.script += \\\"\\\\n\\\" + applyEntity(pd_controls.command, execInfo.entity, execInfo.options)\\n\"+\n",
      "\"            }else{\\n\"+\n",
      "\"                \\n\"+\n",
      "\"                execInfo.targetDivId=execInfo.targetDivId || \\\"dummy\\\";\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            console.log(\\\"Unable to extract entity variable from command\\\", pd_controls.command);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!hasOptions && !execInfo.targetDivId && !execInfo.script){\\n\"+\n",
      "\"        return element.hasAttribute(\\\"pixiedust\\\")?null:readExecInfo(pd_controls, element.parentElement);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!execInfo.script){\\n\"+\n",
      "\"        execInfo.script = applyEntity(pd_controls.command, execInfo.entity, execInfo.options);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    execInfo.nostoreMedatadata = true;\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    if ( pixiedust.dialogRoot ){\\n\"+\n",
      "\"        execInfo.targetDivId = execInfo.targetDivId || pixiedust.dialogRoot;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.execute = function(){\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        if (!preRun(element)){\\n\"+\n",
      "\"            return;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if ( this.options.dialog == 'true' ){\\n\"+\n",
      "\"            pixiedust.executeInDialog(pd_controls, this);\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            pixiedust.executeDisplay(pd_controls, this);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    console.log(\\\"execution info: \\\", execInfo);\\n\"+\n",
      "\"    return execInfo;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function runElement(element){\\n\"+\n",
      "\"    var pd_controls = element.getAttribute(\\\"pixiedust\\\");\\n\"+\n",
      "\"    if (!pd_controls){\\n\"+\n",
      "\"        $(element).parents(\\\"[pixiedust]\\\").each(function(){\\n\"+\n",
      "\"            pd_controls = pd_controls || this.getAttribute(\\\"pixiedust\\\");\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    var execQueue = [];\\n\"+\n",
      "\"    if (pd_controls){\\n\"+\n",
      "\"        pd_controls = JSON.parse(pd_controls);\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        execQueue.push( readExecInfo(pd_controls, element) );\\n\"+\n",
      "\"\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        $(element).children(\\\"target[pd_target]\\\").each(function(){\\n\"+\n",
      "\"            execQueue.push( readExecInfo(pd_controls, this))\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return execQueue;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function filterNonTargetElements(element){\\n\"+\n",
      "\"    if (element && element.tagName == \\\"I\\\"){\\n\"+\n",
      "\"        return filterNonTargetElements(element.parentElement);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return element;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on( \\\"click\\\", \\\"[pixiedust]\\\", function(event){\\n\"+\n",
      "\"    execQueue = runElement(filterNonTargetElements(event.target));\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $.each( execQueue, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            event.stopImmediatePropagation();\\n\"+\n",
      "\"            value.execute();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"});\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on( \\\"DOMNodeInserted\\\", \\\"[pd_widget]\\\", function(event){\\n\"+\n",
      "\"    event.stopImmediatePropagation();\\n\"+\n",
      "\"    execQueue = runElement(filterNonTargetElements(event.target));\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $.each( execQueue, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            value.targetDivId = $(event.target).uniqueId().attr('id');\\n\"+\n",
      "\"            $(event.target).removeAttr(\\\"pd_widget\\\");\\n\"+\n",
      "\"            value.execute();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"});\\n\"+\n",
      "\"\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on(\\\"pd_event\\\", function(event, eventInfo){\\n\"+\n",
      "\"    targetDivId = eventInfo.targetDivId;\\n\"+\n",
      "\"    if (targetDivId){\\n\"+\n",
      "\"        eventHandlers = $(\\\"pd_event_handler\\\").filter(function(){\\n\"+\n",
      "\"            if (this.getAttribute(\\\"pd_target\\\") == targetDivId){\\n\"+\n",
      "\"                return true;\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            return $(this).parents(\\\"[pd_target]\\\").filter(function(){\\n\"+\n",
      "\"                return this.getAttribute(\\\"pd_target\\\") == targetDivId;\\n\"+\n",
      "\"            }).length > 0;\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"        eventHandlers.each(function(){\\n\"+\n",
      "\"            execQueue = runElement(this);\\n\"+\n",
      "\"            $.each( execQueue, function(index, value){\\n\"+\n",
      "\"                if (value){\\n\"+\n",
      "\"                    \\n\"+\n",
      "\"                    if (value.script){\\n\"+\n",
      "\"                        value.script = \\\"true=True\\\\nfalse=False\\\\neventInfo=\\\"+JSON.stringify(eventInfo) + \\\"\\\\n\\\" + value.script;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    value.execute();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            });\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }else{\\n\"+\n",
      "\"        console.log(\\\"Warning: got a pd_event with no targetDivId\\\", eventInfo);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"});\";\n",
      "    try{\n",
      "        g.appendChild(document.createTextNode(code));\n",
      "    }catch(e){\n",
      "        g.text = code;\n",
      "    }\n",
      "    s.parentNode.insertBefore(g,s);\n",
      "}\n",
      "2017-06-02 10:27:49,367 - pixiedust.display - DEBUG - Creating a new display handler with options {'nostore_bokeh': 'false', 'showLegend': 'true', 'cell_id': 'E5567636FCD6456F8FCA891793706C98', 'stacked': 'false', 'title': 'Simple Bar Chart', 'org_params': 'nostore_pixiedust', 'staticFigure': 'false', 'aggregation': 'SUM', 'nostore_cw': '1098', 'clusterby': 'year', 'rowCount': '100', 'handlerId': 'barChart', 'valueFields': 'unique_customers', 'rendererId': 'bokeh', 'charttype': 'grouped', 'keyFields': 'zone', 'nostore_pixiedust': 'true', 'showchrome': 'true'}: <pixiedust.display.chart.ChartDisplayMeta object at 0x117145b90>\n",
      "2017-06-02 10:27:49,373 - pixiedust.display.chart.renderers - DEBUG - Found renderer: bokeh - barChart\n",
      "2017-06-02 10:27:49,802 - pixiedust.display - DEBUG - Creating a new display handler with options {'nostore_bokeh': 'false', 'showLegend': 'true', 'cell_id': 'E5567636FCD6456F8FCA891793706C98', 'stacked': 'false', 'title': 'Simple Bar Chart', 'org_params': 'nostore_pixiedust', 'staticFigure': 'false', 'prefix': '505326c4', 'aggregation': 'SUM', 'nostore_cw': '1098', 'clusterby': 'year', 'rowCount': '100', 'handlerId': 'barChart', 'valueFields': 'unique_customers', 'rendererId': 'bokeh', 'charttype': 'grouped', 'keyFields': 'zone', 'nostore_pixiedust': 'true'}: <pixiedust.display.chart.ChartDisplayMeta object at 0x117145b90>\n",
      "2017-06-02 10:27:49,805 - pixiedust.display.chart.renderers - DEBUG - Found renderer: bokeh - barChart\n",
      "2017-06-02 10:27:49,806 - pixiedust.display.chart.renderers.baseChartDisplay - DEBUG - No Cache Entry found for E5567636FCD6456F8FCA891793706C98\n",
      "2017-06-02 10:27:52,847 - pixiedust.display.display.Display - DEBUG - chartOptions [{'metadata': {'default': 100, 'max': 100, 'type': 'slider', 'min': 50}, 'name': 'chartsize', 'description': 'Chart Size'}, {'validate': <function <lambda> at 0x117515d70>, 'metadata': {'default': '', 'values': ['None', u'year'], 'type': 'dropdown'}, 'name': 'clusterby', 'refresh': True, 'description': 'Cluster By'}, {'metadata': {'default': 'false', 'type': 'checkbox'}, 'name': 'timeseries', 'description': 'Time Series'}, {'metadata': {'default': 'grouped', 'values': ['grouped', 'stacked', 'subplots'], 'type': 'dropdown'}, 'name': 'charttype', 'description': 'Type'}, {'metadata': {'default': 'true', 'type': 'checkbox'}, 'name': 'legend', 'description': 'Show legend'}]\n",
      "2017-06-02 10:27:52,847 - pixiedust.display.display.Display - DEBUG - values: ['year']\n",
      "2017-06-02 10:27:52,847 - pixiedust.display.display.Display - DEBUG - Calling with year\n",
      "2017-06-02 10:27:52,847 - pixiedust.utils.template - DEBUG - Template already qualified pixiedust.display.chart.renderers.baseChartDisplay:baseChartOptionsDialogBody.html\n",
      "2017-06-02 10:28:01,880 - pixiedust.utils.scalaBridge.PixiedustScalaMagics - DEBUG - Calling scala compiler with command: /Users/mbrobergus.ibm.com/pixiedust/bin/scala/scala-2.11.8/bin/scalac -classpath /Users/mbrobergus.ibm.com/pixiedust/data/libs/graphframes-0.1.0-spark1.6.jar:/Users/mbrobergus.ibm.com/pixiedust/data/libs/pixiedust.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/conf/:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/activation-1.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr-2.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr-runtime-3.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/antlr4-runtime-4.5.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/aopalliance-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/aopalliance-repackaged-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apache-log4j-extras-1.2.17.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apacheds-i18n-2.0.0-M15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/api-asn1-api-1.0.0-M20.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/api-util-1.0.0-M20.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/arpack_combined_all-0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-1.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-ipc-1.7.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/avro-mapred-1.7.7-hadoop2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/base64-2.3.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/bcprov-jdk15on-1.51.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/bonecp-0.8.0.RELEASE.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/breeze-macros_2.11-0.11.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/breeze_2.11-0.11.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-avatica-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-core-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/calcite-linq4j-1.2.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/chill-java-0.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/chill_2.11-0.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-beanutils-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-beanutils-core-1.8.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-cli-1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-codec-1.10.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-collections-3.2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-compiler-2.7.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-compress-1.4.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-configuration-1.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-dbcp-1.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-digester-1.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-httpclient-3.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-io-2.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-lang-2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-lang3-3.3.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-logging-1.1.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-math3-3.4.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-net-2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/commons-pool-1.5.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/compress-lzf-1.0.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/core-1.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-client-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-framework-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/curator-recipes-2.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-api-jdo-3.2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-core-3.2.10.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/datanucleus-rdbms-3.2.9.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/derby-10.12.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/eigenbase-properties-1.1.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/gson-2.2.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guava-14.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guice-3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/guice-servlet-3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-annotations-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-auth-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-client-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-hdfs-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-app-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-core-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-jobclient-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-mapreduce-client-shuffle-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-api-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-client-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-server-common-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hadoop-yarn-server-web-proxy-2.7.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-beeline-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-cli-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-exec-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-jdbc-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hive-metastore-1.2.1.spark2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-api-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-locator-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/hk2-utils-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/htrace-core-3.1.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/httpclient-4.5.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/httpcore-4.4.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/ivy-2.4.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-annotations-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-core-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-core-asl-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-databind-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-jaxrs-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-mapper-asl-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-module-paranamer-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-module-scala_2.11-2.6.5.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jackson-xc-1.9.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/janino-2.7.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/java-xmlbuilder-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/JavaEWAH-0.3.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javassist-3.18.1-GA.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.annotation-api-1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.inject-1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.inject-2.4.0-b34.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.servlet-api-3.1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javax.ws.rs-api-2.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/javolution-5.5.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jaxb-api-2.2.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jcl-over-slf4j-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jdo-api-3.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-client-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-common-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-container-servlet-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-container-servlet-core-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-guava-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-media-jaxb-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jersey-server-2.22.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jets3t-0.9.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jetty-6.1.26.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jetty-util-6.1.26.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jline-2.12.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/joda-time-2.9.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jodd-core-3.5.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jpam-1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json-20090211.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-ast_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-core_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/json4s-jackson_2.11-3.2.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jsp-api-2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jsr305-1.3.9.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jta-1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jtransforms-2.4.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/jul-to-slf4j-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/kryo-shaded-3.0.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/leveldbjni-all-1.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/libfb303-0.9.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/libthrift-0.9.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/log4j-1.2.17.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/lz4-1.3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mail-1.4.7.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mesos-0.21.1-shaded-protobuf.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-core-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-graphite-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-json-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/metrics-jvm-3.1.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/minlog-1.3.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/mx4j-3.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/netty-3.8.0.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/netty-all-4.0.29.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/objenesis-2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/opencsv-2.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/oro-2.0.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/osgi-resource-locator-1.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/paranamer-2.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-column-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-common-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-encoding-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-format-2.3.0-incubating.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-generator-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-hadoop-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-hadoop-bundle-1.6.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/parquet-jackson-1.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pmml-model-1.2.15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pmml-schema-1.2.15.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/protobuf-java-2.5.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/py4j-0.10.3.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/pyrolite-4.13.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/RoaringBitmap-0.5.11.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-compiler-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-library-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-parser-combinators_2.11-1.0.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-reflect-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scala-xml_2.11-1.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/scalap-2.11.8.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/slf4j-api-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/slf4j-log4j12-1.7.16.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/snappy-0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/snappy-java-1.1.2.6.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-catalyst_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-core_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-graphx_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-hive-thriftserver_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-hive_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-launcher_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-mllib-local_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-mllib_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-network-common_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-network-shuffle_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-repl_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-sketch_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-sql_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-streaming_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-tags_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-unsafe_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spark-yarn_2.11-2.0.2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spire-macros_2.11-0.7.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/spire_2.11-0.7.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/ST4-4.0.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stax-api-1.0-2.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stax-api-1.0.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stream-2.7.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/stringtemplate-3.2.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/super-csv-2.2.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/univocity-parsers-2.1.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/validation-api-1.1.0.Final.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xbean-asm5-shaded-4.4.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xercesImpl-2.9.1.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xmlenc-0.52.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/xz-1.0.jar:/Users/mbrobergus.ibm.com/pixiedust/bin/spark/spark-2.0.2-bin-hadoop2.7/jars/zookeeper-3.4.6.jar pixiedustRunner.scala\n",
      "2017-06-02 10:28:05,138 - pixiedust.utils.javaBridge - DEBUG - Calling callMethod: methodName: init\n",
      "2017-06-02 10:28:05,142 - pixiedust.utils.javaBridge - DEBUG - Found method with Name init\n",
      "2017-06-02 10:28:05,144 - pixiedust.utils.javaBridge - DEBUG - Calling callMethod: methodName: setD1\n",
      "2017-06-02 10:28:05,151 - pixiedust.utils.javaBridge - DEBUG - Found method with Name setD1\n",
      "2017-06-02 10:28:05,152 - pixiedust.utils.javaBridge - DEBUG - Calling callMethod: methodName: runCell\n",
      "2017-06-02 10:28:05,154 - pixiedust.utils.javaBridge - DEBUG - Found method with Name runCell\n",
      "2017-06-02 10:28:35,808 - pixiedust.display - DEBUG - Creating a new display handler with options {}: <pixiedust.display.display.CellHandshakeMeta object at 0x117444250>\n",
      "2017-06-02 10:28:35,920 - pixiedust.display.display.Display - DEBUG - pixiedust code: if (typeof pixiedust == \"undefined\"){\n",
      "    var s=document.getElementsByTagName('script')[0];\n",
      "    var g=document.createElement( 'script'  );\n",
      "    g.type= 'text/javascript';\n",
      "    g.defer=false; \n",
      "    g.async=false;\n",
      "    var code = \"var pixiedust = (function(){\\n\"+\n",
      "\"    return {\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        executeDisplay:function(pd_controls, user_controls){\\n\"+\n",
      "\"            pd_controls = pd_controls || {};\\n\"+\n",
      "\"            user_controls = user_controls || {\\\"options\\\":{}};\\n\"+\n",
      "\"            var options = $.extend({}, pd_controls.options || {}, user_controls.options || {} );\\n\"+\n",
      "\"            function onDisplayDone(){\\n\"+\n",
      "\"                if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                    user_controls.onDisplayDone();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            var pd_prefix = pd_controls.prefix;\\n\"+\n",
      "\"            var $targetDivId = user_controls.targetDivId;\\n\"+\n",
      "\"            !function() {\\n\"+\n",
      "\"    function getTargetNode(){\\n\"+\n",
      "\"        return $('#' + ($targetDivId || (\\\"wrapperHTML\\\"+ pd_prefix)));\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    var cellId = options.cell_id || \\\"\\\";\\n\"+\n",
      "\"    var curCell=IPython.notebook.get_cells().filter(function(cell){\\n\"+\n",
      "\"        return cell.cell_id==cellId;\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    curCell=curCell.length>0?curCell[0]:null;\\n\"+\n",
      "\"    console.log(\\\"curCell\\\",curCell);\\n\"+\n",
      "\"    var startWallToWall;\\n\"+\n",
      "\"        var callbacks = {\\n\"+\n",
      "\"        shell : {\\n\"+\n",
      "\"            reply : function(){\\n\"+\n",
      "\"                if ( !callbacks.response ){\\n\"+\n",
      "\"                    getTargetNode().html(\\\"\\\")\\n\"+\n",
      "\"                    if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                        user_controls.onDisplayDone();\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            },\\n\"+\n",
      "\"            payload : {\\n\"+\n",
      "\"                set_next_input : function(payload){\\n\"+\n",
      "\"                    if (curCell){\\n\"+\n",
      "\"                        curCell._handle_set_next_input(payload);\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        },\\n\"+\n",
      "\"        iopub:{\\n\"+\n",
      "\"            output:function(msg){\\n\"+\n",
      "\"                callbacks.response = true;\\n\"+\n",
      "\"                console.log(\\\"msg\\\", msg);\\n\"+\n",
      "\"                if (cellId == \\\"\\\"){\\n\"+\n",
      "\"                    if (curCell){\\n\"+\n",
      "\"                        curCell.output_area.handle_output.apply(curCell.output_area, arguments);\\n\"+\n",
      "\"                        curCell.output_area.outputs=[];\\n\"+\n",
      "\"                    }else{\\n\"+\n",
      "\"                        console.log(\\\"Could not find current cell\\\");\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    return;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                var msg_type=msg.header.msg_type;\\n\"+\n",
      "\"                var content = msg.content;\\n\"+\n",
      "\"                if(msg_type===\\\"stream\\\"){\\n\"+\n",
      "\"                    if (user_controls.onSuccess){\\n\"+\n",
      "\"                        user_controls.onSuccess(content.text);\\n\"+\n",
      "\"                    }else{\\n\"+\n",
      "\"                        getTargetNode().html(content.text);\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }else if (msg_type===\\\"display_data\\\" || msg_type===\\\"execute_result\\\"){\\n\"+\n",
      "\"                    var html=null;\\n\"+\n",
      "\"                    if (!!content.data[\\\"text/html\\\"]){\\n\"+\n",
      "\"                        html=content.data[\\\"text/html\\\"];\\n\"+\n",
      "\"                    }else if (!!content.data[\\\"image/png\\\"]){\\n\"+\n",
      "\"                        html=html||\\\"\\\";\\n\"+\n",
      "\"                        html+=\\\"<img src='data:image/png;base64,\\\" +content.data[\\\"image/png\\\"]+\\\"'></img>\\\";\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                                                    \\n\"+\n",
      "\"                    if (!!content.data[\\\"application/javascript\\\"]){\\n\"+\n",
      "\"                        try {\\n\"+\n",
      "\"                            eval(content.data[\\\"application/javascript\\\"]);\\n\"+\n",
      "\"                        } catch(err) {\\n\"+\n",
      "\"                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\\n\"+\n",
      "\"                        }                        \\n\"+\n",
      "\"                        return;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    \\n\"+\n",
      "\"                    if (html){\\n\"+\n",
      "\"                        try{\\n\"+\n",
      "\"                            if (user_controls.onSuccess){\\n\"+\n",
      "\"                                user_controls.onSuccess(html);\\n\"+\n",
      "\"                            }else{\\n\"+\n",
      "\"                                getTargetNode().html(html);\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }catch(e){\\n\"+\n",
      "\"                            console.log(\\\"Invalid html output\\\", e, html);\\n\"+\n",
      "\"                            getTargetNode().html( \\\"Invalid html output: \\\" + e.message + \\\"<pre>\\\" \\n\"+\n",
      "\"                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\\\"/g,'&quot;') + \\\"<pre>\\\");\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"\\n\"+\n",
      "\"                        if(curCell&&curCell.output_area&&curCell.output_area.outputs){\\n\"+\n",
      "\"                            setTimeout(function(){\\n\"+\n",
      "\"                                var data = JSON.parse(JSON.stringify(content.data));\\n\"+\n",
      "\"                                if(!!data[\\\"text/html\\\"])data[\\\"text/html\\\"]=html;\\n\"+\n",
      "\"                                function savedData(data){\\n\"+\n",
      "\"                                    \\n\"+\n",
      "\"                                    var markup='<style type=\\\"text/css\\\">.pd_warning{display:none;}</style>';\\n\"+\n",
      "\"                                    markup+='<div class=\\\"pd_warning\\\"><em>Hey, there\\\\'s something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>';\\n\"+\n",
      "\"                                    nodes = $.parseHTML(data[\\\"text/html\\\"], null, true);\\n\"+\n",
      "\"                                    var s = $(nodes).wrap(\\\"<div>\\\").parent().find(\\\".pd_save\\\").not(\\\".pd_save .pd_save\\\")\\n\"+\n",
      "\"                                    s.each(function(){\\n\"+\n",
      "\"                                        var found = false;\\n\"+\n",
      "\"                                        if ( $(this).attr(\\\"id\\\") ){\\n\"+\n",
      "\"                                            var n = $(\\\"#\\\" + $(this).attr(\\\"id\\\"));\\n\"+\n",
      "\"                                            if (n.length>0){\\n\"+\n",
      "\"                                                found=true;\\n\"+\n",
      "\"                                                n.each(function(){\\n\"+\n",
      "\"                                                    $(this).addClass(\\\"is-viewer-good\\\");\\n\"+\n",
      "\"                                                });\\n\"+\n",
      "\"                                                markup+=n.wrap(\\\"<div>\\\").parent().html();\\n\"+\n",
      "\"                                            }\\n\"+\n",
      "\"                                        }else{\\n\"+\n",
      "\"                                            $(this).addClass(\\\"is-viewer-good\\\");\\n\"+\n",
      "\"                                        }\\n\"+\n",
      "\"                                        if (!found){\\n\"+\n",
      "\"                                            markup+=$(this).parent().html();\\n\"+\n",
      "\"                                        }\\n\"+\n",
      "\"                                    });\\n\"+\n",
      "\"                                    data[\\\"text/html\\\"] = markup;\\n\"+\n",
      "\"                                    return data;\\n\"+\n",
      "\"                                }\\n\"+\n",
      "\"                                curCell.output_area.outputs.push({\\\"data\\\": savedData(data),\\\"metadata\\\":content.metadata,\\\"output_type\\\":msg_type});\\n\"+\n",
      "\"                            },2000);\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                }else if (msg_type === \\\"error\\\") {\\n\"+\n",
      "\"                    require(['base/js/utils'], function(utils) {\\n\"+\n",
      "\"                        var tb = content.traceback;\\n\"+\n",
      "\"                        console.log(\\\"tb\\\",tb);\\n\"+\n",
      "\"                        if (tb && tb.length>0){\\n\"+\n",
      "\"                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\\\\\n';},\\\"\\\");\\n\"+\n",
      "\"                            console.log(\\\"data\\\",data);\\n\"+\n",
      "\"                            data = utils.fixConsole(data);\\n\"+\n",
      "\"                            data = utils.fixCarriageReturn(data);\\n\"+\n",
      "\"                            data = utils.autoLinkUrls(data);\\n\"+\n",
      "\"                            if (user_controls.onError){\\n\"+\n",
      "\"                                user_controls.onError(data);\\n\"+\n",
      "\"                            }else{\\n\"+\n",
      "\"                                getTargetNode().html(\\\"<pre>\\\" + data +\\\"</pre>\\\");\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    });\\n\"+\n",
      "\"                }else{\\n\"+\n",
      "\"                    callbacks.response = false;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                if (user_controls.onDisplayDone){\\n\"+\n",
      "\"                    user_controls.onDisplayDone();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\\n\"+\n",
      "\"        var command = user_controls.script || pd_controls.command.replace(\\\"cellId\\\",cellId);\\n\"+\n",
      "\"        if ( !user_controls.script){\\n\"+\n",
      "\"            function addOptions(options, override=true){\\n\"+\n",
      "\"                function getStringRep(v) {\\n\"+\n",
      "\"                    return \\\"'\\\" + v + \\\"'\\\";\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                for (var key in (options||{})){\\n\"+\n",
      "\"                    var value = options[key];\\n\"+\n",
      "\"                    var hasValue = value != null && typeof value !== 'undefined' && value !== '';\\n\"+\n",
      "\"                    var replaceValue = hasValue ? (key+\\\"=\\\" + getStringRep(value) ) : \\\"\\\";\\n\"+\n",
      "\"                    var pattern = (hasValue?\\\"\\\":\\\",\\\")+\\\"\\\\\\\\s*\\\" + key + \\\"\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"                    var rpattern=new RegExp(pattern);\\n\"+\n",
      "\"                    var n = command.search(rpattern);\\n\"+\n",
      "\"                    if ( n >= 0 ){\\n\"+\n",
      "\"                        if (override){\\n\"+\n",
      "\"                            command = command.replace(rpattern, replaceValue);\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }else if (hasValue){\\n\"+\n",
      "\"                        var n = command.lastIndexOf(\\\")\\\");\\n\"+\n",
      "\"                        command = [command.slice(0, n), (command[n-1]==\\\"(\\\"? \\\"\\\":\\\",\\\") + replaceValue, command.slice(n)].join('')\\n\"+\n",
      "\"                    }        \\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            if(typeof cellMetadata != \\\"undefined\\\" && cellMetadata.displayParams){\\n\"+\n",
      "\"                addOptions(cellMetadata.displayParams);\\n\"+\n",
      "\"                addOptions({\\\"showchrome\\\":\\\"true\\\"});\\n\"+\n",
      "\"            }else if (curCell && curCell._metadata.pixiedust ){\\n\"+\n",
      "\"                addOptions(curCell._metadata.pixiedust.displayParams || {}, pd_controls.useCellMetadata);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            addOptions(user_controls.options||{});\\n\"+\n",
      "\"            var pattern = \\\"\\\\\\\\w*\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"            var rpattern=new RegExp(pattern,\\\"g\\\");\\n\"+\n",
      "\"            var n = command.match(rpattern);\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            var org_params = {}\\n\"+\n",
      "\"            for (var i=0; i<n.length;i++){\\n\"+\n",
      "\"                var parts = n[i].split(\\\"=\\\")\\n\"+\n",
      "\"                if (parts[0].trim() == \\\"org_params\\\"){\\n\"+\n",
      "\"                    var value = parts[1].trim()\\n\"+\n",
      "\"                    var values = value.substring(1,value.length-1).split(\\\",\\\");\\n\"+\n",
      "\"                    for (var p in values){\\n\"+\n",
      "\"                        org_params[values[p].trim()] = true;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    break;\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            var displayParams={}\\n\"+\n",
      "\"            for (var i = 0; i < n.length; i++){\\n\"+\n",
      "\"                var parts=n[i].split(\\\"=\\\");\\n\"+\n",
      "\"                var key = parts[0].trim();\\n\"+\n",
      "\"                var value = parts[1].trim()\\n\"+\n",
      "\"                if (!key.startsWith(\\\"nostore_\\\") && key != \\\"showchrome\\\" && key != \\\"prefix\\\" && key != \\\"cell_id\\\" && key != \\\"org_params\\\" && !!!org_params[key]){\\n\"+\n",
      "\"                    displayParams[key] = value.substring(1,value.length-1);\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"\\n\"+\n",
      "\"            \\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if(curCell&&curCell.output_area){\\n\"+\n",
      "\"            if ( !user_controls.nostoreMedatadata ){\\n\"+\n",
      "\"                curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\\n\"+\n",
      "\"                curCell._metadata.pixiedust.displayParams=displayParams\\n\"+\n",
      "\"                curCell.output_area.outputs=[];\\n\"+\n",
      "\"                var old_msg_id = curCell.last_msg_id;\\n\"+\n",
      "\"                if (old_msg_id) {\\n\"+\n",
      "\"                    curCell.kernel.clear_callbacks_for_msg(old_msg_id);\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            console.log(\\\"couldn't find the cell\\\");\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        $('#wrapperJS' + pd_prefix).html(\\\"\\\")\\n\"+\n",
      "\"        if (!getTargetNode().hasClass( \\\"no_loading_msg\\\" )){\\n\"+\n",
      "\"            getTargetNode().html(\\n\"+\n",
      "\"                '<div style=\\\"width:100px;height:60px;left:47%;position:relative\\\">'+\\n\"+\n",
      "\"                    '<i class=\\\"fa fa-circle-o-notch fa-spin\\\" style=\\\"font-size:48px\\\"></i>'+\\n\"+\n",
      "\"                '</div>'+\\n\"+\n",
      "\"                '<div style=\\\"text-align:center\\\">' +\\n\"+\n",
      "\"                    (getTargetNode().attr(\\\"pd_loading_msg\\\") || \\\"Loading your data. Please wait...\\\") +\\n\"+\n",
      "\"                '</div>'\\n\"+\n",
      "\"            );\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        console.log(\\\"Running command2\\\",command);\\n\"+\n",
      "\"        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"}()\\n\"+\n",
      "\"        },\\n\"+\n",
      "\"        executeInDialog:function(pd_controls, user_controls){\\n\"+\n",
      "\"            pd_controls = pd_controls || {};\\n\"+\n",
      "\"            user_controls = user_controls || {\\\"options\\\":{}};\\n\"+\n",
      "\"            var displayOptions = $.extend({}, pd_controls.options || {}, user_controls.options || {} );\\n\"+\n",
      "\"            var global={};\\n\"+\n",
      "\"            require(['base/js/dialog'],function(dialog){\\n\"+\n",
      "\"                var modal = dialog.modal;\\n\"+\n",
      "\"                var attr_pd_ctrl = JSON.stringify(pd_controls).trim()\\n\"+\n",
      "\"                    .replace(/&/g, '&amp;')\\n\"+\n",
      "\"                    .replace(/'/g, '&apos;')\\n\"+\n",
      "\"                    .replace(/\\\"/g, '&quot;')\\n\"+\n",
      "\"                    .replace(/</g, '&lt;')\\n\"+\n",
      "\"                    .replace(/>/g, '&gt;');\\n\"+\n",
      "\"                var dialogRoot = \\\"dialog\\\" + pd_controls.prefix + \\\"root\\\";\\n\"+\n",
      "\"                var options = {\\n\"+\n",
      "\"                    title: \\\"Pixiedust: \\\" + (displayOptions.title || \\\"Dialog\\\"),\\n\"+\n",
      "\"                    body: '<div id=\\\"' + dialogRoot + '\\\" pixiedust=\\\"' + attr_pd_ctrl + '\\\" class=\\\"pixiedust\\\"></div>',\\n\"+\n",
      "\"                    sanitize:false,\\n\"+\n",
      "\"                    notebook: IPython.notebook,\\n\"+\n",
      "\"                    keyboard_manager: IPython.notebook.keyboard_manager,\\n\"+\n",
      "\"                    maximize_modal: (displayOptions.maximize === \\\"true\\\"),\\n\"+\n",
      "\"                    buttons: {\\n\"+\n",
      "\"                        OK: {\\n\"+\n",
      "\"                            class : \\\"btn-primary btn-ok\\\",\\n\"+\n",
      "\"                            click: function() {\\n\"+\n",
      "\"                                var dlg = $(\\\"#\\\" + dialogRoot + \\\" > pd_dialog\\\");\\n\"+\n",
      "\"                                try{\\n\"+\n",
      "\"                                    return new Function('global', 'modal_obj', dlg.find(\\\"> pd_ok\\\").text().trim())(global, modal_obj);\\n\"+\n",
      "\"                                }catch(e){\\n\"+\n",
      "\"                                    console.error(e);\\n\"+\n",
      "\"                                    return false;\\n\"+\n",
      "\"                                }\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        },\\n\"+\n",
      "\"                        Cancel: {\\n\"+\n",
      "\"                            class : \\\"btn-cancel\\\",\\n\"+\n",
      "\"                            click: function(){\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                function resizeDialog() {\\n\"+\n",
      "\"                    global.modalBodyStyle = $('.pixiedust .modal-body').attr('style');\\n\"+\n",
      "\"                    global.modalFooterStyle = $('.pixiedust .modal-footer').attr('style');\\n\"+\n",
      "\"                    $('.pixiedust .modal-body').attr('style', global.modalBodyStyle ? global.modalBodyStyle + ';padding:5px 20px !important;' : 'padding:5px 20px !important;');\\n\"+\n",
      "\"                    $('.pixiedust .modal-footer').attr('style', 'display:none !important;');\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                function resetDialog() {\\n\"+\n",
      "\"                    if (global.modalBodyStyle) {\\n\"+\n",
      "\"                        $('.pixiedust .modal-body').attr('style', global.modalBodyStyle);\\n\"+\n",
      "\"                    } else {\\n\"+\n",
      "\"                        $('.pixiedust .modal-body').removeAttr('style');\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    if (global.modalFooterStyle) {\\n\"+\n",
      "\"                        $('.pixiedust .modal-footer').attr('style', global.modalFooterStyle);\\n\"+\n",
      "\"                    } else {\\n\"+\n",
      "\"                        $('.pixiedust .modal-footer').removeAttr('style');\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                };\\n\"+\n",
      "\"\\n\"+\n",
      "\"                var modal_obj = modal(options);\\n\"+\n",
      "\"                modal_obj.addClass('pixiedust pixiedust-app');\\n\"+\n",
      "\"                if (options.maximize_modal) {\\n\"+\n",
      "\"                    modal_obj.addClass('pixiedust pixiedust-app pixiedust-maximize');\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"                modal_obj.on('shown.bs.modal', function(){\\n\"+\n",
      "\"                    resizeDialog();\\n\"+\n",
      "\"                    var isFF = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\\n\"+\n",
      "\"                    if( isFF && options.keyboard_manager){\\n\"+\n",
      "\"                        \\n\"+\n",
      "\"                        var KeyboardManager = require('notebook/js/keyboardmanager').KeyboardManager;\\n\"+\n",
      "\"                        global.KMEnableProto = KeyboardManager.prototype.enable;\\n\"+\n",
      "\"                        KeyboardManager.prototype.enable = function () {\\n\"+\n",
      "\"                            this.enabled = false;\\n\"+\n",
      "\"                        };\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    IPython.keyboard_manager.register_events(modal_obj);\\n\"+\n",
      "\"                    user_controls.options.targetDivId = user_controls.targetDivId = dialogRoot;\\n\"+\n",
      "\"                    if ( user_controls.options.dialog == 'true'){\\n\"+\n",
      "\"                        user_controls.onDisplayDone = function(){\\n\"+\n",
      "\"                            var dlg = $(\\\"#\\\" + dialogRoot + \\\" > pd_dialog\\\")\\n\"+\n",
      "\"                            try{\\n\"+\n",
      "\"                                new Function('global', 'modal_obj', dlg.find(\\\"> pd_onload\\\").text().trim())(global, modal_obj);\\n\"+\n",
      "\"                            }catch(e){\\n\"+\n",
      "\"                                console.error(e);\\n\"+\n",
      "\"                            }\\n\"+\n",
      "\"                        }\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    pixiedust.dialogRoot = dialogRoot;\\n\"+\n",
      "\"                    pixiedust.executeDisplay(pd_controls, user_controls);\\n\"+\n",
      "\"                });\\n\"+\n",
      "\"                modal_obj.on(\\\"hidden.bs.modal\\\", function () {\\n\"+\n",
      "\"                    resetDialog();\\n\"+\n",
      "\"                    if ( global.KMEnableProto ){\\n\"+\n",
      "\"                        var KeyboardManager = require('notebook/js/keyboardmanager').KeyboardManager;\\n\"+\n",
      "\"                        KeyboardManager.prototype.enable = global.KMEnableProto;\\n\"+\n",
      "\"                        delete global.KMEnableProto;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    pixiedust.dialogRoot = null;\\n\"+\n",
      "\"                });\\n\"+\n",
      "\"            })\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"})();\\n\"+\n",
      "\"\\n\"+\n",
      "\"function resolveScriptMacros(script){\\n\"+\n",
      "\"    script = script && script.replace(/\\\\$val\\\\(\\\\\\\"?(\\\\w*)\\\\\\\"?\\\\)/g, function(a,b){\\n\"+\n",
      "\"        var v = $(\\\"#\\\" + b ).val();\\n\"+\n",
      "\"        if (!v && window[b] && typeof window[b] === \\\"function\\\"){\\n\"+\n",
      "\"            v = window[b]();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if (!v && pixiedust[b] && typeof pixiedust[b] === \\\"function\\\"){\\n\"+\n",
      "\"            v = pixiedust[b]();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if (!v){\\n\"+\n",
      "\"            console.log(\\\"Warning: Unable to resolve value for element \\\", b);\\n\"+\n",
      "\"            return a;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        return v.split('\\\"').join('&quot;').split('\\\\n').join('\\\\\\\\n');\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    return script;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function getParentScript(element){\\n\"+\n",
      "\"    var scripts = [];\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $(element).parents(\\\"[pd_script]\\\").each(function(){\\n\"+\n",
      "\"        scripts.unshift(this.getAttribute(\\\"pd_script\\\"));\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    var script = \\\"\\\";\\n\"+\n",
      "\"    $.each( scripts, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            script += \\\"\\\\n\\\" + value;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    return script;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function preRun(element){\\n\"+\n",
      "\"    var preRunCode = null;\\n\"+\n",
      "\"    $(element).find(\\\"> pd_script\\\").each(function(){\\n\"+\n",
      "\"        var type = this.getAttribute(\\\"type\\\");\\n\"+\n",
      "\"        if (type==\\\"preRun\\\"){\\n\"+\n",
      "\"            preRunCode = $(this).text();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    if (!preRunCode ){\\n\"+\n",
      "\"        return true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return new Function(preRunCode.trim())();\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function addOptions(command, options, override=true){\\n\"+\n",
      "\"    function getStringRep(v) {\\n\"+\n",
      "\"        return \\\"'\\\" + v + \\\"'\\\";\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    for (var key in (options||{})){\\n\"+\n",
      "\"        var value = options[key];\\n\"+\n",
      "\"        var hasValue = value != null && typeof value !== 'undefined' && value !== '';\\n\"+\n",
      "\"        var replaceValue = hasValue ? (key+\\\"=\\\" + getStringRep(value) ) : \\\"\\\";\\n\"+\n",
      "\"        var pattern = (hasValue?\\\"\\\":\\\",\\\")+\\\"\\\\\\\\s*\\\" + key + \\\"\\\\\\\\s*=\\\\\\\\s*'(\\\\\\\\\\\\\\\\'|[^'])*'\\\";\\n\"+\n",
      "\"        var rpattern=new RegExp(pattern);\\n\"+\n",
      "\"        var n = command.search(rpattern);\\n\"+\n",
      "\"        if ( n >= 0 ){\\n\"+\n",
      "\"            if (override){\\n\"+\n",
      "\"                command = command.replace(rpattern, replaceValue);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else if (hasValue){\\n\"+\n",
      "\"            var n = command.lastIndexOf(\\\")\\\");\\n\"+\n",
      "\"            command = [command.slice(0, n), (command[n-1]==\\\"(\\\"? \\\"\\\":\\\",\\\") + replaceValue, command.slice(n)].join('')\\n\"+\n",
      "\"        }        \\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return command;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function readExecInfo(pd_controls, element){\\n\"+\n",
      "\"    var execInfo = {}\\n\"+\n",
      "\"    execInfo.options = {}\\n\"+\n",
      "\"    var hasOptions = false;\\n\"+\n",
      "\"    $.each( element.attributes, function(){\\n\"+\n",
      "\"        if (this.name.startsWith(\\\"option_\\\")){\\n\"+\n",
      "\"            hasOptions = true;\\n\"+\n",
      "\"            execInfo.options[this.name.replace(\\\"option_\\\", \\\"\\\")] = this.value || null;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"    var pd_options = resolveScriptMacros(element.getAttribute(\\\"pd_options\\\"));\\n\"+\n",
      "\"    if (pd_options){\\n\"+\n",
      "\"        var parts = pd_options.split(\\\";\\\");\\n\"+\n",
      "\"        $.each( parts, function(){\\n\"+\n",
      "\"            var index = this.indexOf(\\\"=\\\");\\n\"+\n",
      "\"            if ( index > 1){\\n\"+\n",
      "\"                hasOptions = true;\\n\"+\n",
      "\"                execInfo.options[this.substring(0, index)] = this.substring(index+1);\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    execInfo.options.nostore_figureOnly = true;\\n\"+\n",
      "\"    execInfo.options.targetDivId = execInfo.targetDivId = element.getAttribute(\\\"pd_target\\\");\\n\"+\n",
      "\"    if (execInfo.options.targetDivId){\\n\"+\n",
      "\"        execInfo.options.no_margin=true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.options.widget = element.getAttribute(\\\"pd_widget\\\");\\n\"+\n",
      "\"\\n\"+\n",
      "\"        var parentStyles = [];\\n\"+\n",
      "\"    var hiddenBlockStyle = 'visibility: hidden !important; display: block !important;';\\n\"+\n",
      "\"    var tDiv = $(\\\"#\\\" + execInfo.targetDivId);\\n\"+\n",
      "\"    var tDivParents = tDiv.parents().addBack().filter(':hidden');\\n\"+\n",
      "\"    tDivParents.each(function() {\\n\"+\n",
      "\"        var currentStyle = $(this).attr('style');\\n\"+\n",
      "\"        parentStyles.push(currentStyle);\\n\"+\n",
      "\"        $(this).attr('style', currentStyle ? currentStyle + ';' + hiddenBlockStyle : hiddenBlockStyle);\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"        w = tDiv.width()\\n\"+\n",
      "\"    if (w) {\\n\"+\n",
      "\"        execInfo.options.nostore_cw= w;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    if ($(element).parents(\\\".modal-dialog\\\").length > 0 ) {\\n\"+\n",
      "\"        h = tDiv.height()\\n\"+\n",
      "\"        if (h) {\\n\"+\n",
      "\"            execInfo.options.nostore_ch = h-10;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"        tDivParents.each(function(i) {\\n\"+\n",
      "\"        if (parentStyles[i] === undefined) {\\n\"+\n",
      "\"            $(this).removeAttr('style');\\n\"+\n",
      "\"        } else {\\n\"+\n",
      "\"            $(this).attr('style', parentStyles[i]);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.script = element.getAttribute(\\\"pd_script\\\");\\n\"+\n",
      "\"    if (!execInfo.script){\\n\"+\n",
      "\"        $(element).find(\\\"> pd_script\\\").each(function(){\\n\"+\n",
      "\"            var type = this.getAttribute(\\\"type\\\");\\n\"+\n",
      "\"            if (!type || type==\\\"python\\\"){\\n\"+\n",
      "\"                execInfo.script = $(this).text();\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        })\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.refresh = element.hasAttribute(\\\"pd_refresh\\\");\\n\"+\n",
      "\"    execInfo.norefresh = element.hasAttribute(\\\"pd_norefresh\\\");\\n\"+\n",
      "\"    execInfo.entity = element.hasAttribute(\\\"pd_entity\\\") ? element.getAttribute(\\\"pd_entity\\\") || \\\"pixieapp_entity\\\" : null;\\n\"+\n",
      "\"\\n\"+\n",
      "\"    function applyEntity(c, e, doptions){\\n\"+\n",
      "\"        if (!e){\\n\"+\n",
      "\"            return addOptions(c, doptions);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        c = c.replace(/\\\\((\\\\w*),/, \\\"($1.\\\" + e + \\\",\\\")\\n\"+\n",
      "\"        return addOptions(c, doptions);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!hasOptions && (execInfo.refresh || execInfo.options.widget) && !execInfo.script){\\n\"+\n",
      "\"        execInfo.script = \\\"#refresh\\\";\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    var dialog = (execInfo.options.dialog == \\\"true\\\");\\n\"+\n",
      "\"    if ( dialog ){\\n\"+\n",
      "\"        execInfo.script = execInfo.script || \\\"#refresh\\\";\\n\"+\n",
      "\"        execInfo.refresh = true;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (execInfo.script){\\n\"+\n",
      "\"        execInfo.script = execInfo.script.trim()\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        var match = pd_controls.command.match(/display\\\\((\\\\w*),/)\\n\"+\n",
      "\"        if (match){\\n\"+\n",
      "\"            var entity = match[1]\\n\"+\n",
      "\"            console.log(\\\"Inject self with entity\\\", entity)\\n\"+\n",
      "\"            execInfo.script = \\\"from pixiedust.utils.shellAccess import ShellAccess\\\\n\\\"+\\n\"+\n",
      "\"                \\\"self=ShellAccess['\\\" + entity + \\\"']\\\\n\\\" +\\n\"+\n",
      "\"                resolveScriptMacros( getParentScript(element) ) + '\\\\n' +\\n\"+\n",
      "\"                resolveScriptMacros(execInfo.script);\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            if ( ( (!dialog && !execInfo.targetDivId) || execInfo.refresh || execInfo.entity) && !execInfo.norefresh && $(element).children(\\\"target[pd_target]\\\").length == 0){\\n\"+\n",
      "\"                \\n\"+\n",
      "\"                execInfo.script += \\\"\\\\n\\\" + applyEntity(pd_controls.command, execInfo.entity, execInfo.options)\\n\"+\n",
      "\"            }else{\\n\"+\n",
      "\"                \\n\"+\n",
      "\"                execInfo.targetDivId=execInfo.targetDivId || \\\"dummy\\\";\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            console.log(\\\"Unable to extract entity variable from command\\\", pd_controls.command);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!hasOptions && !execInfo.targetDivId && !execInfo.script){\\n\"+\n",
      "\"        return element.hasAttribute(\\\"pixiedust\\\")?null:readExecInfo(pd_controls, element.parentElement);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    if (!execInfo.script){\\n\"+\n",
      "\"        execInfo.script = applyEntity(pd_controls.command, execInfo.entity, execInfo.options);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    execInfo.nostoreMedatadata = true;\\n\"+\n",
      "\"\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    if ( pixiedust.dialogRoot ){\\n\"+\n",
      "\"        execInfo.targetDivId = execInfo.targetDivId || pixiedust.dialogRoot;\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    execInfo.execute = function(){\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        if (!preRun(element)){\\n\"+\n",
      "\"            return;\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"        if ( this.options.dialog == 'true' ){\\n\"+\n",
      "\"            pixiedust.executeInDialog(pd_controls, this);\\n\"+\n",
      "\"        }else{\\n\"+\n",
      "\"            pixiedust.executeDisplay(pd_controls, this);\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"\\n\"+\n",
      "\"    console.log(\\\"execution info: \\\", execInfo);\\n\"+\n",
      "\"    return execInfo;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function runElement(element){\\n\"+\n",
      "\"    var pd_controls = element.getAttribute(\\\"pixiedust\\\");\\n\"+\n",
      "\"    if (!pd_controls){\\n\"+\n",
      "\"        $(element).parents(\\\"[pixiedust]\\\").each(function(){\\n\"+\n",
      "\"            pd_controls = pd_controls || this.getAttribute(\\\"pixiedust\\\");\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    var execQueue = [];\\n\"+\n",
      "\"    if (pd_controls){\\n\"+\n",
      "\"        pd_controls = JSON.parse(pd_controls);\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        execQueue.push( readExecInfo(pd_controls, element) );\\n\"+\n",
      "\"\\n\"+\n",
      "\"        \\n\"+\n",
      "\"        $(element).children(\\\"target[pd_target]\\\").each(function(){\\n\"+\n",
      "\"            execQueue.push( readExecInfo(pd_controls, this))\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return execQueue;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"function filterNonTargetElements(element){\\n\"+\n",
      "\"    if (element && element.tagName == \\\"I\\\"){\\n\"+\n",
      "\"        return filterNonTargetElements(element.parentElement);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"    return element;\\n\"+\n",
      "\"}\\n\"+\n",
      "\"\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on( \\\"click\\\", \\\"[pixiedust]\\\", function(event){\\n\"+\n",
      "\"    execQueue = runElement(filterNonTargetElements(event.target));\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $.each( execQueue, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            event.stopImmediatePropagation();\\n\"+\n",
      "\"            value.execute();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"});\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on( \\\"DOMNodeInserted\\\", \\\"[pd_widget]\\\", function(event){\\n\"+\n",
      "\"    event.stopImmediatePropagation();\\n\"+\n",
      "\"    execQueue = runElement(filterNonTargetElements(event.target));\\n\"+\n",
      "\"    \\n\"+\n",
      "\"    $.each( execQueue, function(index, value){\\n\"+\n",
      "\"        if (value){\\n\"+\n",
      "\"            value.targetDivId = $(event.target).uniqueId().attr('id');\\n\"+\n",
      "\"            $(event.target).removeAttr(\\\"pd_widget\\\");\\n\"+\n",
      "\"            value.execute();\\n\"+\n",
      "\"        }\\n\"+\n",
      "\"    });\\n\"+\n",
      "\"});\\n\"+\n",
      "\"\\n\"+\n",
      "\"\\n\"+\n",
      "\"$(document).on(\\\"pd_event\\\", function(event, eventInfo){\\n\"+\n",
      "\"    targetDivId = eventInfo.targetDivId;\\n\"+\n",
      "\"    if (targetDivId){\\n\"+\n",
      "\"        eventHandlers = $(\\\"pd_event_handler\\\").filter(function(){\\n\"+\n",
      "\"            if (this.getAttribute(\\\"pd_target\\\") == targetDivId){\\n\"+\n",
      "\"                return true;\\n\"+\n",
      "\"            }\\n\"+\n",
      "\"            \\n\"+\n",
      "\"            return $(this).parents(\\\"[pd_target]\\\").filter(function(){\\n\"+\n",
      "\"                return this.getAttribute(\\\"pd_target\\\") == targetDivId;\\n\"+\n",
      "\"            }).length > 0;\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"        eventHandlers.each(function(){\\n\"+\n",
      "\"            execQueue = runElement(this);\\n\"+\n",
      "\"            $.each( execQueue, function(index, value){\\n\"+\n",
      "\"                if (value){\\n\"+\n",
      "\"                    \\n\"+\n",
      "\"                    if (value.script){\\n\"+\n",
      "\"                        value.script = \\\"true=True\\\\nfalse=False\\\\neventInfo=\\\"+JSON.stringify(eventInfo) + \\\"\\\\n\\\" + value.script;\\n\"+\n",
      "\"                    }\\n\"+\n",
      "\"                    value.execute();\\n\"+\n",
      "\"                }\\n\"+\n",
      "\"            });\\n\"+\n",
      "\"        });\\n\"+\n",
      "\"    }else{\\n\"+\n",
      "\"        console.log(\\\"Warning: got a pd_event with no targetDivId\\\", eventInfo);\\n\"+\n",
      "\"    }\\n\"+\n",
      "\"});\";\n",
      "    try{\n",
      "        g.appendChild(document.createTextNode(code));\n",
      "    }catch(e){\n",
      "        g.text = code;\n",
      "    }\n",
      "    s.parentNode.insertBefore(g,s);\n",
      "}\n",
      "2017-06-02 10:28:36,475 - pixiedust.display - DEBUG - Creating a new display handler with options {'cell_id': '172D650A866A4E3480E3B228CDB116F7', 'org_params': 'nostore_pixiedust', 'nostore_cw': '1098', 'handlerId': 'dataframe', 'nostore_bokeh': 'true', 'nostore_pixiedust': 'true', 'showchrome': 'true'}: <pixiedust.display.table.TableDisplayMeta object at 0x117152790>\n",
      "2017-06-02 10:28:36,964 - pixiedust.display - DEBUG - Creating a new display handler with options {'cell_id': '172D650A866A4E3480E3B228CDB116F7', 'org_params': 'nostore_pixiedust', 'prefix': '2523b2f1', 'nostore_cw': '1098', 'handlerId': 'dataframe', 'nostore_bokeh': 'true', 'nostore_pixiedust': 'true'}: <pixiedust.display.table.TableDisplayMeta object at 0x117152790>\n"
     ]
    }
   ],
   "source": [
    "% pixiedustLog -l debug"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Environment Info.\n",
    "The following cells will print out information related to your notebook environment.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainer476e6da1\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistie476e6da1\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobName476e6da1\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgress476e6da1\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_container476e6da1\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitors476e6da1\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContent476e6da1\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistie476e6da1\").click(function(){\n",
       "    visible = $(\"#pm_container476e6da1\").is(':visible');\n",
       "    $(\"#pm_container476e6da1\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%scala\n",
    "val __scala_version = util.Properties.versionNumberString"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"pm_overallContainer39a3988a\" style=\"display:none\">\n",
       "    <table width=\"100%\" style=\"border:0px\">\n",
       "        <tr style=\"border:0px\">\n",
       "            <td width=\"20px\" style=\"border:0px\"><span id=\"twistie39a3988a\" style=\"color:blue;font-size:x-large;cursor:pointer\">&#9656;</span></td>\n",
       "            <td width=\"130px\" style=\"text-align:left;border:0px\"><span id=\"pm_overallJobName39a3988a\"></span>:</td>\n",
       "            <td width=\"calc(100% - 150px)\" style=\"border:0px\"><progress id=\"pm_overallProgress39a3988a\" max=\"100\" value=\"0\" style=\"width:100%\"></progress></td>\n",
       "        </tr>\n",
       "    </table>\n",
       "</div>\n",
       "<div id=\"pm_container39a3988a\" style=\"display:none\">\n",
       "    <ul class=\"nav nav-tabs\" id=\"progressMonitors39a3988a\">\n",
       "    </ul>\n",
       "    <div class=\"tab-content\" id=\"tabContent39a3988a\">\n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "$(\"#twistie39a3988a\").click(function(){\n",
       "    visible = $(\"#pm_container39a3988a\").is(':visible');\n",
       "    $(\"#pm_container39a3988a\").slideToggle(\"slow\");\n",
       "    $(this).html(visible?\"&#9656;\":\"&#9662;\")\n",
       "});\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "PYTHON VERSON = 2.7.13\n",
      "SPARK VERSON = 2.0.2\n",
      "SCALA VERSON = 2.11.8\n"
     ]
    }
   ],
   "source": [
    "import platform\n",
    "print('PYTHON VERSON = ' + platform.python_version())\n",
    "print('SPARK VERSON = ' + sc.version)\n",
    "print('SCALA VERSON = ' + __scala_version)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# More Info.\n",
    "For more information about PixieDust check out the following:\n",
    "#### PixieDust Documentation: https://pixiedust.github.io/pixiedust/index.html\n",
    "#### PixieDust GitHub Repo: https://github.com/ibm-watson-data-lab/pixiedust"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python with Pixiedust (Spark 2.0)",
   "language": "python",
   "name": "pythonwithpixiedustspark20"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
